fix compilation warning
This commit is contained in:
parent
46a9e51f74
commit
5b6f4ecc12
@ -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" }
|
||||
};
|
||||
|
2
src/os.c
2
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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user