From ac8e5e4e5b38e49d95d0b4662f0b3eebce2fd5f1 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Fri, 15 Feb 2019 09:24:01 +0000 Subject: [PATCH] Fix comment to represent current PAL API. --- src/mem/largealloc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mem/largealloc.h b/src/mem/largealloc.h index 11aa6e0..67ce11c 100644 --- a/src/mem/largealloc.h +++ b/src/mem/largealloc.h @@ -191,10 +191,13 @@ namespace snmalloc { if ((decommit_strategy != DecommitNone) || (large_class > 0)) { - // Only the first page needs to be zeroed, as this was decommitted. + // The first page is already in "use" for the stack element, + // this will need zeroing for a YesZero call. if (zero_mem == YesZero) memory_provider.template zero(p, OS_PAGE_SIZE); + // Notify we are using the rest of the allocation. + // Passing zero_mem ensures the PAL provides zeroed pages if required. memory_provider.template notify_using( (void*)((size_t)p + OS_PAGE_SIZE), bits::align_up(size, OS_PAGE_SIZE) - OS_PAGE_SIZE);