3 ms·
You can certainly allocate memory at controlled addresses using mmap or VirtualAlloc. But you should not play virtual memory games at runtime in an application
by amluto 4y ago
You can certainly allocate memory at controlled addresses using mmap or VirtualAlloc.
But you should not play virtual memory games at runtime in an application that you expect to be scalable. Unmapping memory or changing its permissions requires propagating the change to all threads in the process. On x86, the performance impact is dramatic. On ARM64, it’s not as bad but it’s still there.
Also, even 64 bits can go fast when you start using high bits, separate pools for different purposes, etc.