Merge pull request #17 from plietar/fix-align

Fix the condition on when to allocate a new block.
This commit is contained in:
Matthew Parkinson
2019-02-12 13:10:53 +00:00
committed by GitHub

View File

@@ -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();
}