From a09a64e29b5535f6f4ea70fc58ac41c91c73a440 Mon Sep 17 00:00:00 2001 From: daan Date: Tue, 19 May 2020 10:40:46 -0700 Subject: [PATCH] add extra check in mi_page_unreset to not unreset for huge OS pages --- src/segment.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/segment.c b/src/segment.c index d36cf1c5..9190034a 100644 --- a/src/segment.c +++ b/src/segment.c @@ -245,6 +245,7 @@ static void mi_page_unreset(mi_segment_t* segment, mi_page_t* page, size_t size, mi_assert_internal(page->is_reset); mi_assert_internal(page->is_committed); mi_assert_internal(!segment->mem_is_fixed); + if (segment->mem_is_fixed || !page->is_committed || !page->is_reset) return; page->is_reset = false; size_t psize; uint8_t* start = mi_segment_raw_page_start(segment, page, &psize);