microsoft / mimalloc

mimalloc is a compact general purpose allocator with excellent performance.
MIT License
10.57k stars 860 forks source link

doubles allocation size #752

Open jhunsaker opened 1 year ago

jhunsaker commented 1 year ago

mi_malloc(1UL << 24)

results in

mmap(0x25764000000, 33554432, ...

but

mi_malloc((1UL << 24) + (1UL << 21))

results in

mmap(0x5ccc8000000, 19922944, ...

why does it double the size in the first case? in the second case the extra allocation is 1MB

jhunsaker commented 1 year ago

mi_option_enable(mi_option_large_os_pages); is set (only other code besides the mi_malloc call)