添加节点分别改为2

This commit is contained in:
aozhiwei 2019-08-31 17:14:37 +08:00
parent 9849b7ebae
commit e08bffc119

View File

@ -145,7 +145,7 @@ GSNode* GSMgr::AllocNode()
if (node_sorted_list_.empty()) { if (node_sorted_list_.empty()) {
return nullptr; return nullptr;
} }
size_t rnd = std::min((size_t)5, node_sorted_list_.size()); size_t rnd = std::min((size_t)2, node_sorted_list_.size());
int idx = rand() % rnd; int idx = rand() % rnd;
while (idx >= 0) { while (idx >= 0) {
if (node_sorted_list_[idx]->servicing) { if (node_sorted_list_[idx]->servicing) {