Re:How fast can you allocate a large block of memory in C++?
by Const-me on Thursday January 16, 2020 @08:30AM
(#22064299)
> And glibc malloc has a threshold (128 kB or thereabouts) where it switches to using mmap()
Very similar on Windows. In modern CRT, malloc is a thin wrapper over HeapAlloc WinAPI. That one has a threshold (512kb or 1MB depending on 32- or 64-bit process) where it switches to VirtualAlloc.
Very similar on Windows. In modern CRT, malloc is a thin wrapper over HeapAlloc WinAPI. That one has a threshold (512kb or 1MB depending on 32- or 64-bit process) where it switches to VirtualAlloc.