Re:C Programming Guidelines
by jeffreyrogers on Wednesday September 02, 2015 @12:08AM
(#10157376)
That would work too. malloc() uses mmap() internally for large allocations, so the reason to use mmap() is just to skip all the other stuff malloc() does (which you don't care about if you have a custom allocator).
In other words, the malloc-versus-mmap distinction here isn't the important one, it's the custom allocator versus system allocator one.