mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-12 14:18:42 +03:00
experimental eager page commit option
This commit is contained in:
parent
4452431b6c
commit
c6df7a199c
5 changed files with 57 additions and 38 deletions
2
src/os.c
2
src/os.c
|
@ -603,7 +603,7 @@ static void* mi_os_page_align_area_conservative(void* addr, size_t size, size_t*
|
|||
// (but not for the reset version where we want commit to be conservative as well)
|
||||
static bool mi_os_commitx(void* addr, size_t size, bool commit, bool conservative, bool* is_zero, mi_stats_t* stats) {
|
||||
// page align in the range, commit liberally, decommit conservative
|
||||
*is_zero = false;
|
||||
if (is_zero != NULL) { *is_zero = false; }
|
||||
size_t csize;
|
||||
void* start = mi_os_page_align_areax(conservative, addr, size, &csize);
|
||||
if (csize == 0) return true; // || _mi_os_is_huge_reserved(addr))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue