Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/bthread/key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@

namespace bthread {

DEFINE_uint32(key_table_list_size, 5000,
DEFINE_uint32(key_table_list_size, 4000,
"The maximum length of the KeyTableList. Once this value is "
"exceeded, a portion of the KeyTables will be moved to the "
"global free_keytables list.");

DEFINE_uint32(borrow_from_globle_size, 100,
DEFINE_uint32(borrow_from_globle_size, 200,
"The maximum number of KeyTables retrieved in a single operation "
"from the global free_keytables when no KeyTable exists in the "
"current thread's keytable_list.");
Expand Down Expand Up @@ -289,11 +289,12 @@ class BAIDU_CACHELINE_ALIGNMENT KeyTableList {
count++;
}
if (prev != NULL) {
prev->next = NULL;
if (*target == NULL) {
*target = _head;
prev->next = NULL;
} else {
(*target)->next = _head;
prev->next = *target;
*target = _head;
}
_head = current;
_length -= count;
Expand Down