Added some constexpr to some ifs.

This commit is contained in:
Matthew Parkinson
2019-02-15 16:12:38 +00:00
parent ac8e5e4e5b
commit 8698f87018
6 changed files with 13 additions and 13 deletions

View File

@@ -943,7 +943,7 @@ namespace snmalloc
{
super_available.remove(super);
if (decommit_strategy == DecommitSuper)
if constexpr (decommit_strategy == DecommitSuper)
{
large_allocator.memory_provider.notify_not_using(
(void*)((size_t)super + OS_PAGE_SIZE),
@@ -1027,7 +1027,7 @@ namespace snmalloc
sc->remove(slab);
}
if (decommit_strategy == DecommitSuper)
if constexpr (decommit_strategy == DecommitSuper)
{
large_allocator.memory_provider.notify_not_using(
(void*)((size_t)slab + OS_PAGE_SIZE),