Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documented M, m, n, w, W, t, c and H options of OCAMLRUNPARAM, Fixes #8697 #10666

Merged
merged 15 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Working version

- #8697, #10666: add M, m, n options of the OCAMLRUNPARAM to manual and man page
for ocamlrun command line options
(Dong An and Anukriti Kumar, review by David Allsopp, Gabriel Scherer)
(Dong An and Anukriti Kumar, review by David Allsopp, Gabriel Scherer and Damien Doligez)
kirisky marked this conversation as resolved.
Show resolved Hide resolved

- #10605: manual, name few css classes to ease styling and maintainability.
(Florian Angeletti, review by Wiktor Kuchta and Gabriel Scherer)
Expand Down
27 changes: 16 additions & 11 deletions man/ocamlrun.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ flag in the OCAMLRUNPARAM environment variable (see below).
.I dir
for dynamically-loaded libraries, in addition to the standard search path.
.TP
.B \-m
Print the magic number of the bytecode executable given as argument and
exit.
.BI \-m \ file
Print the magic number of the bytecode executable
kirisky marked this conversation as resolved.
Show resolved Hide resolved
.I file
kirisky marked this conversation as resolved.
Show resolved Hide resolved
and exit.
.TP
.B \-M
Print the magic number expected for bytecode executables by this version
Expand All @@ -88,7 +89,8 @@ flag in the OCAMLRUNPARAM environment variable (see below).
and exit.
.TP
.B \-t
Increments the trace level for the debug runtime (ignored otherwise).
Increment the trace level for the debug runtime (ignored by the standard
kirisky marked this conversation as resolved.
Show resolved Hide resolved
runtime).
.TP
.B \-v
Direct the memory manager to print verbose messages on standard error.
Expand Down Expand Up @@ -130,8 +132,9 @@ in the OCAMLRUNPARAM environment variable (see below).
and an optional multiplier. If the letter is followed by anything
else, the corresponding option is set to 1. Unknown letters
are ignored.
The options are documented below; the
last six correspond to the fields of the
The options are documented below; the options
.B a, i, l, m, M, n, o, O, s, v
kirisky marked this conversation as resolved.
Show resolved Hide resolved
correspond to the fields of the
.B control
record documented in
.IR "The OCaml user's manual",
Expand Down Expand Up @@ -159,11 +162,12 @@ also enables pooling (as in caml_startup_pooled). This mode can be used
The initial size of the major heap (in words).
.TP
.BR H
Allocates heap chunks by mmapping huge pages. Huge pages are locked into
Allocate heap chunks by mmapping huge pages. Huge pages are locked into
memory, and are not swapped.
.TP
.BR i \ (major_heap_increment)
The default size increment for the major heap (in words).
The default size increment for the major heap (in words if greater than 1000,
else in percents of the heap size).
.TP
.BR l \ (stack_limit)
The limit (in words) of the stack size.
Expand Down Expand Up @@ -227,7 +231,8 @@ Turn on randomization of all hash tables by default (see the
The size of the minor heap (in words).
.TP
.B t
Sets the trace level for the debug runtime (ignored otherwise).
Set the trace level for the debug runtime (ignored by the standard
kirisky marked this conversation as resolved.
Show resolved Hide resolved
runtime).
.TP
.BR v \ (verbose)
What GC messages to print to stderr. This is a sum of values selected
Expand Down Expand Up @@ -268,11 +273,11 @@ Startup messages (loading the bytecode executable file, resolving
Output GC statistics at program exit, in the same format as Gc.print_stat.
.TP
.BR w
Sets size of window used by major GC for smoothing out variations in
Set size of the window used by major GC for smoothing out variations in
its workload. This is an integer between 1 and 50. (Default: 1)
.TP
.BR W
Activates runtime warnings (such as Channel opened on file dies without
Print runtime warnings to stderr (such as Channel opened on file dies without
being closed, unflushed data, etc.)

.RS 0
Expand Down
16 changes: 9 additions & 7 deletions manual/src/cmds/runtime.etex
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,11 @@ The following environment variables are also consulted:
pooling (as in "caml_startup_pooled"). This mode can be used to detect
leaks with a third-party memory debugger.
\item[h] The initial size of the major heap (in words).
\item[H] Allocates heap chunks by mmapping huge pages. Huge pages are locked into
\item[H] Allocate heap chunks by mmapping huge pages. Huge pages are locked into
memory, and are not swapped.
\item[i] ("major_heap_increment") Default size increment for the
major heap. (in words)
major heap. (in words if greater than 1000, else in percents of the
head size)
\item[l] ("stack_limit") The limit (in words) of the stack size. This is only
relevant to the byte-code runtime, as the native code runtime uses the
operating system's stack.
Expand Down Expand Up @@ -182,7 +183,7 @@ The following environment variables are also consulted:
\fi
This option takes no argument.
\item[s] ("minor_heap_size") Size of the minor heap. (in words)
\item[t] Sets the trace level for the debug runtime (ignored otherwise).
\item[t] Set the trace level for the debug runtime (ignored otherwise).
kirisky marked this conversation as resolved.
Show resolved Hide resolved
\item[v] ("verbose") What GC messages to print to stderr. This
is a sum of values selected from the following:
\begin{options}
Expand All @@ -199,10 +200,11 @@ The following environment variables are also consulted:
\item[512 (= 0x200)] Computation of compaction-triggering condition.
\item[1024 (= 0x400)] Output GC statistics at program exit.
\end{options}
\item[w] Sets size of window used by major GC for smoothing out variations in
its workload. This is an integer between 1 and 50. (Default: 1)
\item[W] Activates runtime warnings (such as Channel opened on file dies without
being closed, unflushed data, etc.)
\item[w] Set the size of the window used by major GC for smoothing out
variations in its workload. This is an integer between 1 and 50.
(Default: 1)
\item[W] Print runtime warnings to stderr (such as Channel opened on file
dies without being closed, unflushed data, etc.)

If the option letter is not recognized, the whole parameter is ignored;
if the equal sign or the number is missing, the value is taken as 1;
Expand Down