mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-28 05:50:51 +08:00
Merge branch 'dev-win' into dev-exp
This commit is contained in:
commit
b80b0837ab
@ -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) {
|
||||
|
@ -359,14 +359,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) {
|
||||
UNUSED(force);
|
||||
|
Loading…
x
Reference in New Issue
Block a user