3 ms·
This one's pretty obvious if you've ever written a malloc. Compare VirtualAlloc² with the mess of mmap/madvise/mprotect. I'm not even sure you can get the nice
by faragon 10y ago
This one's pretty obvious if you've ever written a malloc. Compare VirtualAlloc² with the mess of mmap/madvise/mprotect. I'm not even sure you can get the nice explicit reserve/commit of Windows with pure POSIX APIs.
Then, can you explain why the C library provided by Microsoft in their compilers has such slow 'realloc()' implementation? (e.g. expanding a 10MB allocation to 20MB using realloc())