diff --git a/src/mem/largealloc.h b/src/mem/largealloc.h index 720f4fd..16c1df8 100644 --- a/src/mem/largealloc.h +++ b/src/mem/largealloc.h @@ -110,7 +110,7 @@ namespace snmalloc if (slab->get_kind() != Decommitted) { PAL::notify_not_using( - static_cast(slab) + OS_PAGE_SIZE, decommit_size); + pointer_offset(slab, OS_PAGE_SIZE), decommit_size); } // Once we've removed these from the stack, there will be no // concurrent accesses and removal should have established a diff --git a/src/mem/pagemap.h b/src/mem/pagemap.h index 7e907c9..0eada66 100644 --- a/src/mem/pagemap.h +++ b/src/mem/pagemap.h @@ -78,7 +78,7 @@ namespace snmalloc (INDEX_LEVELS * BITS_PER_INDEX_LEVEL) + BITS_FOR_LEAF + GRANULARITY_BITS; // Value used to represent when a node is being added too - static constexpr InvalidPointer<1> LOCKED_ENTRY; + static constexpr InvalidPointer<1> LOCKED_ENTRY{}; struct Leaf {