packages icon
Undumping
---------
 An undumped program is built by combining the header and text from
an executable with data extracted from a core dump of that executable.
Since the core data includes dynamically allocated data an undumped 
program is usually larger than its corresponding executable.

Why undump
----------
 Undumping can be used for programs which load a saved state or 
initialise themselves from large configuration files. The undumped
version may start faster than the original.  Another possible use would
be to save the state of a long running background job if the system goes down.

  The program must designed to switch off state loading when the
undumped version starts up. This could be done by a command flag or
by checking to see if some global flag variable is already initialised.

Examples
--------
 Early versions of TeX were designed with undumping in mind.

 SWI Prolog is normally execed from a shell script using 
the "-r" argument to load saved state data stored in the script.
If SWI receives a quit signal at the ?- Prolog prompt it will core dump.
An undumped SWI can then be built from the core and SWI executable.
Undumped SWI can be executed directly without using "-r" : it will 
start in whatever state was extracted from the core.

Perl
----
 The Perl language has a mechanism for dumping a compiled Perl script
to a core file. Such core files can be undumped in conjunction with the 
Perl binary.  For this to work the Perl binary must have been built with
archive rather than shared libraries. A sample Perl version 4 binary is 
included with this distribution.

/Updated 26/08/94
Comments etc. to d.j.nixon@csc.liv.ac.uk