From 5b6f4ecc128a6774a8afabe59032531d7b934063 Mon Sep 17 00:00:00 2001 From: daan Date: Wed, 10 Jul 2019 07:50:04 -0700 Subject: [PATCH] fix compilation warning --- src/options.c | 2 +- src/os.c | 2 +- src/segment.c | 8 -------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/options.c b/src/options.c index 528d10df..9362cb64 100644 --- a/src/options.c +++ b/src/options.c @@ -44,7 +44,7 @@ static mi_option_desc_t options[_mi_option_last] = { #else { 0, UNINIT, "secure" }, #endif - { 1, UNINIT, "show_stats" }, + { 0, UNINIT, "show_stats" }, { MI_DEBUG, UNINIT, "show_errors" }, { 0, UNINIT, "verbose" } }; diff --git a/src/os.c b/src/os.c index a16527a9..92dcbbef 100644 --- a/src/os.c +++ b/src/os.c @@ -397,7 +397,7 @@ static void* mi_os_page_align_area_conservative(void* addr, size_t size, size_t* static bool mi_os_commitx(void* addr, size_t size, bool commit, bool conservative, mi_stats_t* stats) { // page align in the range, commit liberally, decommit conservative size_t csize; - void* start = mi_os_page_align_areax(!commit, addr, size, &csize); + void* start = mi_os_page_align_areax(conservative, addr, size, &csize); if (csize == 0) return true; int err = 0; if (commit) { diff --git a/src/segment.c b/src/segment.c index fe356859..3bf777d4 100644 --- a/src/segment.c +++ b/src/segment.c @@ -412,14 +412,6 @@ static mi_segment_t* mi_segment_alloc( size_t required, mi_page_kind_t page_kind return segment; } -#if MI_STAT -// Available memory in a page -static size_t mi_page_size(const mi_page_t* page) { - size_t psize; - _mi_page_start(_mi_page_segment(page), page, &psize); - return psize; -} -#endif static void mi_segment_free(mi_segment_t* segment, bool force, mi_segments_tld_t* tld) { //fprintf(stderr,"mimalloc: free segment at %p\n", (void*)segment);