From 7dce31f74385f713749b4a902cc16d31f211c01b Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Tue, 22 Nov 2022 18:13:27 -0800 Subject: [PATCH] reenable decommitting of a huge aligned prefix --- src/segment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/segment.c b/src/segment.c index b922a50c..b67fce87 100644 --- a/src/segment.c +++ b/src/segment.c @@ -1261,7 +1261,7 @@ static mi_page_t* mi_segment_huge_page_alloc(size_t size, size_t page_alignment, mi_segments_track_size(-(long)segment->segment_size, tld); mi_page_t* page = mi_segment_find_free(segment, tld); mi_assert_internal(page != NULL); -#if MI_DEBUG > 3 + if (page_alignment > 0) { size_t psize; size_t pre_size; @@ -1276,7 +1276,7 @@ static mi_page_t* mi_segment_huge_page_alloc(size_t size, size_t page_alignment, _mi_mem_decommit(decommit_start, decommit_size, os_tld); } } -#endif + // for huge pages we initialize the xblock_size as we may // overallocate to accommodate large alignments. size_t psize;