Avoid unnecessary allocation from realloc

This commit is contained in:
theodus
2019-02-02 14:47:06 -05:00
parent c0ceb6e08f
commit 85cf5dd097
2 changed files with 6 additions and 5 deletions

View File

@@ -71,7 +71,7 @@ namespace snmalloc
meta.debug_slab_invariant(is_short(), this);
if (zero_mem == YesZero)
if constexpr (zero_mem == YesZero)
{
if (rsize < PAGE_ALIGNED_SIZE)
memory_provider.zero(p, rsize);