[Openmcl-devel] forking to dump?
hans at huebner.org
Thu Jul 10 06:24:38 UTC 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.
More information about the Openmcl-devel