Scheme 48 Manual | Contents | In Chapter: Command processor
Previous: Command programs | Next: Resource query and control

Building images

,dump filename [identification]
Writes the current heap out to a file, which can then be run using the virtual machine. The new image file includes the command processor. If present, identification should be a string (written with double quotes); this string will be part of the greeting message as the image starts up.
,build exp filename
Like ,dump, except that the image file contains the value of exp, which should be a procedure of one argument, instead of the command processor. When filename is resumed, that procedure will be invoked on the VM's -a arguments, which are passed as a list of strings. The procedure should return an integer which is returned to the program that invoked the VM. The command processor and debugging system are not included in the image (unless you go to some effort to preserve them, such as retaining a continuation).

Doing ,flush before building an image will reduce the amount of debugging information in the image, making for a smaller image file, but if an error occurs, the error message may be less helpful. Doing ,flush source maps before loading any programs used in the image will make it still smaller. See the description of flush for more information.

Previous: Command programs | Next: Resource query and control