fix compilation warning

This commit is contained in:
daan 2019-07-10 07:50:04 -07:00
parent 46a9e51f74
commit 5b6f4ecc12
3 changed files with 2 additions and 10 deletions

View File

@ -44,7 +44,7 @@ static mi_option_desc_t options[_mi_option_last] = {
#else #else
{ 0, UNINIT, "secure" }, { 0, UNINIT, "secure" },
#endif #endif
{ 1, UNINIT, "show_stats" }, { 0, UNINIT, "show_stats" },
{ MI_DEBUG, UNINIT, "show_errors" }, { MI_DEBUG, UNINIT, "show_errors" },
{ 0, UNINIT, "verbose" } { 0, UNINIT, "verbose" }
}; };

View File

@ -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) { 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 // page align in the range, commit liberally, decommit conservative
size_t csize; 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; if (csize == 0) return true;
int err = 0; int err = 0;
if (commit) { if (commit) {

View File

@ -412,14 +412,6 @@ static mi_segment_t* mi_segment_alloc( size_t required, mi_page_kind_t page_kind
return segment; 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) { 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); //fprintf(stderr,"mimalloc: free segment at %p\n", (void*)segment);