1OCAMLRUN(1)                 General Commands Manual                OCAMLRUN(1)
2
3
4

NAME

6       ocamlrun - The Objective Caml bytecode interpreter
7
8

SYNOPSIS

10       ocamlrun [ -v ] filename argument ...
11
12

DESCRIPTION

14       The ocamlrun(1) command executes bytecode files produced by the linking
15       phase of the ocamlc(1) command.
16
17       The first non-option argument is taken to be the name of the file  con‐
18       taining  the  executable  bytecode.  (That file is searched in the exe‐
19       cutable path as well as in the current directory.) The remaining  argu‐
20       ments  are  passed  to  the Objective Caml program, in the string array
21       Sys.argv. Element 0 of this array is the  name  of  the  bytecode  exe‐
22       cutable file; elements 1 to n are the remaining arguments.
23
24       In  most cases, the bytecode executable files produced by the ocamlc(1)
25       command are self-executable, and manage to launch the ocamlrun(1)  com‐
26       mand on themselves automatically.
27
28

OPTIONS

30       The following command-line option is recognized by ocamlrun(1).
31
32
33       -v     When set, the memory manager prints verbose messages on standard
34              error to signal garbage collections and heap extensions.
35
36

ENVIRONMENT VARIABLES

38       The following environment variable are also consulted:
39
40
41       OCAMLRUNPARAM
42              Set the garbage collection parameters.  (If OCAMLRUNPARAM is not
43              set,  CAMLRUNPARAM will be used instead.)  This variable must be
44              a sequence of parameter specifications.  A parameter  specifica‐
45              tion  is  an option letter followed by an = sign, a decimal num‐
46              ber, and an optional multiplier.  There are seven options:
47
48       b (backtrace)
49              Print a stack backtrace in case of an uncaught exception.
50
51       s (minor_heap_size)
52              Size of the minor heap.
53
54       i (major_heap_increment)
55              Minimum size increment for the major heap.
56
57       o (space_overhead)
58              The major GC speed setting.
59
60       O (max_overhead)
61              The heap compaction trigger setting.
62
63       l (stack_limit)
64              The limit (in words) of the stack size.
65
66       h      The initial size of the major heap (in words).
67
68       v (verbose)
69              What GC messages to print to stderr.  This is a  sum  of  values
70              selected from the following:
71
72       1      Start of major GC cycle.
73
74       2      Minor collection and major GC slice.
75
76       4      Growing and shrinking of the heap.
77
78       8      Resizing of stacks and memory manager tables.
79
80       16     Heap compaction.
81
82       32     Change of GC parameters.
83
84       64     Computation of major GC slice size.
85
86       128    Calling of finalisation function.
87
88       256    Startup messages.
89
90              The  multiplier  is  k  , M , or G , for multiplication by 2^10,
91              2^20, and 2^30 respectively.  For example, on a  32-bit  machine
92              under  bash, the command export OCAMLRUNPARAM='s=256k,v=1' tells
93              a subsequent ocamlrun to set its initial minor heap  size  to  1
94              megabyte  and  to  print a message at the start of each major GC
95              cycle.
96
97
98       PATH   List of directories searched to  find  the  bytecode  executable
99              file.
100
101

SEE ALSO

103       ocamlc(1).
104       The Objective Caml user's manual, chapter "Runtime system".
105
106
107
108                                                                   OCAMLRUN(1)
Impressum