Merge pull request #65 from microsoft/queue_of_slabs
Use a queue of slabs for free lists
This commit is contained in:
@@ -1114,7 +1114,7 @@ namespace snmalloc
|
||||
if ((allow_reserve == NoReserve) && (slab == nullptr))
|
||||
return nullptr;
|
||||
|
||||
sl.insert(slab->get_link());
|
||||
sl.insert_back(slab->get_link());
|
||||
}
|
||||
auto& ffl = small_fast_free_lists[sizeclass];
|
||||
return slab->alloc<zero_mem>(
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace snmalloc
|
||||
meta.link = index;
|
||||
|
||||
// Push on the list of slabs for this sizeclass.
|
||||
sl->insert(meta.get_link(this));
|
||||
sl->insert_back(meta.get_link(this));
|
||||
meta.debug_slab_invariant(is_short(), this);
|
||||
return Superslab::NoSlabReturn;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user