Scheme 48 Manual | Contents | In Chapter: User's guide
Previous: User's guide | Next: Command processor

## Command line arguments

A few command line arguments are processed by Scheme 48 as it starts up.

`scheme48` [`-i` `image`] [`-h` `heapsize`] [`-a` `argument ...`]

`-i` `image`
  specifies a heap image file to resume. This defaults to a heap image that runs a Scheme command processor. Heap images are created by the `,dump` and `,build commands`, for which see below.

`-h` `heapsize`
  specifies how much space should be reserved for allocation. `Heapsize` is in words (where one word = 4 bytes), and covers both semispaces, only one of which is in use at any given time (except during garbage collection). Cons cells are currently 3 words, so if you want to make sure you can allocate a million cons cells, you should specify `-h 6000000` (actually somewhat more than this, to account for the initial heap image and breathing room). The default heap size is 3000000 words. The system will use a larger heap if the specified (or default) size is less than the size of the image being resumed.

`-a` `argument ...`
  is only useful with images built using `,build`. The arguments are passed as a list of strings to the procedure specified in the `,build` command as for example:

  >     > (define (f a) (for-each display a) (newline) 0)
  >     > ,build f foo.image
  >     > ,exit
  >     % scheme48vm -i foo.image -a mumble "foo x"
  >     mumblefoo x
  >     %

The usual definition of the `s48` or `scheme48` command is actually a shell script that starts up the Scheme 48 virtual machine with a `-i `imagefile`` specifying the development environment heap image and a `-o `vm-executable`` specifying the location of the virtual-machine executable (the executable is needed for loading external code on some versions of Unix; see section * for more information). The file `go` in the Scheme 48 installation source directory is an example of such a shell script.

Previous: User's guide | Next: Command processor