зеркало из https://github.com/microsoft/snmalloc.git
Fix the condition on when to allocate a new block.
Previously we would pretty much always allocate a new block for each allocator, making them 16MiB aligned.
This commit is contained in:
Родитель
ccd8ec9b4f
Коммит
79b432ddab
|
@ -80,7 +80,7 @@ namespace snmalloc
|
|||
FlagLock f(lock);
|
||||
|
||||
auto aligned_bump = bits::align_up(bump, alignment);
|
||||
if ((aligned_bump - bump) < size)
|
||||
if ((aligned_bump - bump) > remaining)
|
||||
{
|
||||
new_block();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче