mmalloc.info: Overview

Go forward to Implementation
Go backward to Top
Go up to Top
Go to the top op mmalloc

Overall Description

This is a heavily modified version of GNU `malloc'.  It uses `mmap' as
the basic mechanism for obtaining memory from the system, rather than
`sbrk'.  This gives it several advantages over the more traditional
malloc:
   * Several different heaps can be used, each of them growing or
     shinking under control of `mmap', with the `mmalloc' functions
     using a specific heap on a call by call basis.
   * By using `mmap', it is easy to create heaps which are intended to
     be persistent and exist as a filesystem object after the creating
     process has gone away.
   * Because multiple heaps can be managed, data used for a specific
     purpose can be allocated into its own heap, making it easier to
     allow applications to "dump" and "restore" initialized
     malloc-managed memory regions.  For example, the "unexec" hack
     popularized by GNU Emacs could potentially go away.