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 4 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
6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -4403,6 +4403,12 @@ OCaml 4.07.0 (10 July 2018)
- #1779: integrate the Bigarray documentation into the main manual.
(Perry E. Metzger, review by Florian Angeletti and Xavier Clerc)

- #9398: updated man page for ocamlrun command line options
(Anukriti Kumar, review by David Allsopp, Gabriel Scherer)

- #10666: add M, m, n options of the OCAMLRUNPARAM to manual and man page for ocamlrun command line options
(Dong An, review by David Allsopp, Gabriel Scherer)

kirisky marked this conversation as resolved.
Show resolved Hide resolved
### Type system:

- #7611, #1491: reject the use of generative functors as applicative.
Expand Down
28 changes: 28 additions & 0 deletions man/ocamlrun.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,22 @@ 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.
kirisky marked this conversation as resolved.
Show resolved Hide resolved
.TP
.B \-M
Print the magic number expected for bytecode executables by this version
of the runtime and exit.
.TP
.B \-p
Print the names of the primitives known to this version of
.BR ocamlrun (1)
and exit.
.TP
.B \-t
Increments the trace level for the debug runtime (ignored otherwise).
kirisky marked this conversation as resolved.
Show resolved Hide resolved
.TP
.B \-v
Direct the memory manager to print verbose messages on standard error.
This is equivalent to setting
Expand Down Expand Up @@ -132,6 +143,11 @@ in the OCAMLRUNPARAM environment variable (see below).
when an uncaught exception aborts the program.
This option takes no argument.
.TP
.B c
(cleanup_on_exit) Shut the runtime down gracefully on exit. The option
also enables pooling (as in caml_startup_pooled). This mode can be used
to detect leaks with a third-party memory debugger.
.TP
.B p
Turn on debugging support for
.BR ocamlyacc -generated
Expand All @@ -145,9 +161,21 @@ Turn on randomization of all hash tables by default (see the
module of the standard library). This option takes no
argument.
.TP
.BR H
Allocates heap chunks by mmapping huge pages. Huge pages are locked into
kirisky marked this conversation as resolved.
Show resolved Hide resolved
memory, and are not swapped.
.TP
.BR h
The initial size of the major heap (in words).
.TP
.BR w
kirisky marked this conversation as resolved.
Show resolved Hide resolved
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)
.TP
.BR W
Activates runtime warnings (such as Channel opened on file dies without
being closed, unflushed data, etc.)
.TP
.BR a \ (allocation_policy)
The policy used for allocating in the OCaml heap. Possible values
are 0 for the next-fit policy, 1 for the first-fit
Expand Down
9 changes: 8 additions & 1 deletion manual/src/cmds/runtime.etex
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ section~\ref{s:ocamlrun-dllpath}).
Print the magic number of the bytecode executable given as argument
and exit.
\item["-M"]
Print the magic number expected by this version of the runtime and exit.
Print the magic number expected for bytecode executables by this version
of the runtime and exit.
\item["-p"]
Print the names of the primitives known to this version of
"ocamlrun" and exit.
Expand Down Expand Up @@ -136,7 +137,13 @@ The following environment variables are also consulted:
section~\ref{Hashtbl}).
\fi
This option takes no argument.
\item[H] Allocates heap chunks by mmapping huge pages. Huge pages are locked into
memory, and are not swapped.
\item[h] The initial size of the major heap (in words).
\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.)
kirisky marked this conversation as resolved.
Show resolved Hide resolved
\item[a] ("allocation_policy")
The policy used for allocating in the OCaml heap. Possible values
are "0" for the next-fit policy, "1" for the first-fit
Expand Down