From c2679188ada9ea1d9d442be37e1b0158816054b2 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Tue, 30 Apr 2019 09:38:35 +0100 Subject: [PATCH] Fix the build on Windows. --- src/mem/largealloc.h | 2 +- src/mem/pagemap.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 {