ocamlrun (1)





NAME

       ocamlrun - The Objective Caml bytecode interpreter


SYNOPSIS

       ocamlrun [ -v ] filename argument ...


DESCRIPTION

       The ocamlrun(1) command executes bytecode files produced by the linking
       phase of the ocamlc(1) command.

       The first non-option argument is taken to be the name of the file  con-
       taining  the  executable  bytecode.  (That file is searched in the exe-
       cutable path as well as in the current directory.) The remaining  argu-
       ments  are  passed  to  the  Caml  Light  program,  in the string array
       Sys.argv. Element 0 of this array is the  name  of  the  bytecode  exe-
       cutable file; elements 1 to n are the remaining arguments.

       In  most cases, the bytecode executable files produced by the ocamlc(1)
       command are self-executable, and manage to launch the ocamlrun(1)  com-
       mand on themselves automatically.


OPTIONS

       The following command-line option is recognized by ocamlrun(1).

       -v     When set, the memory manager prints verbose messages on standard
              error to signal garbage collections and heap extensions.


ENVIRONMENT VARIABLES

       The following environment variable are also consulted:

       OCAMLRUNPARAM
              Set the garbage collection parameters.  (If OCAMLRUNPARAM is not
              set,  CAMLRUNPARAM will be used instead.)  This variable must be
              a sequence of parameter specifications.  A parameter  specifica-
              tion  is  an option letter followed by an = sign, a decimal num-
              ber, and an optional multiplier.  There are seven options:

       s (minor_heap_size)
              Size of the minor heap.

       i (major_heap_increment)
              Minimum size increment for the major heap.

       o (space_overhead)
              The major GC speed setting.

       O (max_overhead)
              The heap compaction trigger setting.

       1      Start of major GC cycle.

       2      Minor collection and major GC slice.

       4      Growing and shrinking of the heap.

       8      Resizing of stacks and memory manager tables.

       16     Heap compaction.

       32     Change of GC parameters.

       64     Computation of major GC slice size.

              The  multiplier  is  k  , M , or G , for multiplication by 2^10,
              2^20, and 2^30 respectively.  For example, on a  32-bit  machine
              under  bash, the command export OCAMLRUNPARAM='s=256k,v=1' tells
              a subsequent ocamlrun to set its initial minor heap  size  to  1
              megabyte  and  to  print a message at the start of each major GC
              cycle.

       PATH   List of directories searched to  find  the  bytecode  executable
              file.


SEE ALSO

       ocamlc(1).
       The Objective Caml user's manual, chapter "Runtime system".

                                                                   ocamlrun(1)