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().
source
share