Runtime arguments
Command line arguments given to Modula-3 programs are divided in two
groups. Runtime parameters are those that start with the characters
@M3. They are reserved for the Modula-3 runtime and are accessible
via the RTParams interface.
The others are program arguments and are accessible via the Params
interface.
The following runtime parameters are recognized today; others are simply
ignored.
- @M3nogc turns the garbage collector off.
- @M3showheap=name activates the logging of heap allocation
and garbage collection events. The program forks a process running the
name program, and sends it these events as they occur. If "=name"
is omitted, the showheap program
is forked (it is part of the tools archive); this program displays
the status of the heap pages.
- @M3showthread=name activates the logging of thread switching
events. The program forks a process running the name program, and
sends it these events as they occur. If "=name"
is omitted, the showthread program
is forked (it is part of the tools archive); this program displays
the status of the various threads.
- @M3shownew=name activates the logging of per-type heap
allocations. The program forks a process running the name program,
and periodically sends it the number and sizes of recently allocated objects.
If "=name" is omitted, the shownew
program is forked (it is part of the tools archive); this program
displays one of several bar graphs.
- @M3update=X sets the interval between shownew updates
to X seconds. X must be an integer.
- @M3noincremental disables incremental garbage collection; uses
stop-and-copy instead.
- @M3nogenerational disables generational garbage collection.
- @M3novm disables the use of VM protection
by the garbage collector. On some platforms, @M3novm is essential
for debugging. @M3novm implies @M3noincremental
and @M3nogenerational.
- @M3paranoidgc checks the heap for sanity after each collection.
- @M3stackdump causes checked runtime errors to produce a stack
dump on stderr. On systems with stack walkers (DS3100 and ALPHA_OSF)
the dump includes exception and procedure frames. On other systems only
the exception frames are dumped.