[TUHS] Memory management in Dennis Ritchie's C Compiler

Paul Winalski paul.winalski at gmail.com
Tue Aug 18 05:28:27 AEST 2020

On 8/17/20, Jim Geist <velocityboy at gmail.com> wrote:
> When did mmap(2) come about? Another thing I've seen is building a small
> block allocator on top of that. You can guarantee that all your objects are
> nicely collected into the same set of pages for locality with very little
> overhead.
mmap(2) certainly can be used to allocate blocks for the mini-heap
itself, but you still have to write your own equivalents of malloc()
and free() to allocate data structures within the mini-heap.  The nice
thing about VMS heap zones and Microsoft's private heaps is that you
get the malloc()/free() layer off-the-shelf; you don't have to roll
your own.

-Paul W.

More information about the TUHS mailing list