HeapCreate, HeapAlloc on Linux, a private distributor for Linux

On Windows, for very demanding applications, a programmer can use HeapCreate, HeapAlloc, to better manage and control the distribution of memory speeds (for example, private allocators). What is equivalent in Linux ++ programming?

+5
source share
1 answer

If you want to use your own allocator, use mmap()to map the amount of memory into your process, then you can use this memory as you wish. Open the file descriptor before /dev/zero, and then use it as the "fildes" parameter for mmap(). See man mmapfor complete information on the parameters passed. In this respect, it mmap()plays the same role as HeapCreate().

+3
source

All Articles