[Openmcl-devel] forking to dump?

Hans Hübner hans at huebner.org
Wed Jul 9 23:24:38 PDT 2008


On Thu, Jul 10, 2008 at 08:16, Tobias C. Rittweiler <tcr at freebits.de> wrote:

> But if S-A modifies the heap of the child, doesn't it also modify the
> heap of the parent, possibly corrupting it?

fork() creates a new child process with a copy of the memory image of
the parent process.  It is normally implemented using copy-on-write
pages.  The child process has no access to the parent's memory image,
so it can't corrupt it's heap.  In single threaded Lisps, forking to
dump an image works trivially well.  With multi-threaded Lisps, some
effort is needed to make sure that the memory image is in a sane and
dumpable state before forking.

-Hans



More information about the Openmcl-devel mailing list