Skip to content

Commit

Permalink
document-M-m-n-option:
Browse files Browse the repository at this point in the history
	1. Correct Change file
	2. Tidy the options to a-z order.
  • Loading branch information
Dong An committed Sep 28, 2021
1 parent 785a724 commit 0eeb6a5
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 103 deletions.
6 changes: 3 additions & 3 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ Working version
in case of concurrent modifications.
(Xavier Leroy, report by whitequark, review by David Allsopp)

- #10605: manual, name few css classes to ease styling and maintainability.
(Florian Angeletti, review by Wiktor Kuchta and Gabriel Scherer)

- #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)

- #10605: manual, name few css classes to ease styling and maintainability.
(Florian Angeletti, review by Wiktor Kuchta and Gabriel Scherer)

### Compiler user-interface and warnings:

- #10328: Give more precise error when disambiguation could not possibly work.
Expand Down
102 changes: 51 additions & 51 deletions man/ocamlrun.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ in the OCAMLRUNPARAM environment variable (see below).
.IR "The OCaml user's manual",
chapter "Standard Library", section "Gc".
.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
policy, and 2 for the best-fit policy. The default is 2.
See the Gc module documentation for details.
.TP
.B b
Trigger the printing of a stack backtrace
when an uncaught exception aborts the program.
Expand All @@ -147,58 +153,29 @@ in the OCAMLRUNPARAM environment variable (see below).
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
parsers. When this option is on,
the pushdown automaton that executes the parsers prints a
trace of its actions. This option takes no argument.
.TP
.BR R
Turn on randomization of all hash tables by default (see the
.B Hashtbl
module of the standard library). This option takes no
argument.
.TP
.B t
Sets the trace level for the debug runtime (ignored otherwise).
.BR h
The initial size of the major heap (in words).
.TP
.BR H
Allocates heap chunks by mmapping huge pages. Huge pages are locked into
memory, and are not swapped.
.TP
.BR h
The initial size of the major heap (in words).
.TP
.BR 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)
.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
policy, and 2 for the best-fit policy. The default is 2.
See the Gc module documentation for details.
.TP
.BR s \ (minor_heap_size)
The size of the minor heap (in words).
.TP
.BR i \ (major_heap_increment)
The default size increment for the major heap (in words).
.TP
.BR o \ (space_overhead)
The major GC speed setting.
.TP
.BR O \ (max_overhead)
The heap compaction trigger setting.
.TP
.BR l \ (stack_limit)
The limit (in words) of the stack size.
.TP
.BR m \ (custom_minor_ratio)
Bound on floating garbage for out-of-heap memory
held by custom values in the minor heap. A minor GC is triggered
when this much memory is held by custom values located in the minor
heap. Expressed as a percentage of minor heap size.
Note: this only applies to values allocated with
.B caml_alloc_custom_mem
(e.g. bigarrays).
Default: 100.
.TP
.BR M \ (custom_major_ratio)
Target ratio of floating garbage to
major heap size for out-of-heap memory held by custom values
Expand All @@ -212,16 +189,6 @@ The limit (in words) of the stack size.
(e.g. bigarrays).
Default: 44.
.TP
.BR m \ (custom_minor_ratio)
Bound on floating garbage for out-of-heap memory
held by custom values in the minor heap. A minor GC is triggered
when this much memory is held by custom values located in the minor
heap. Expressed as a percentage of minor heap size.
Note: this only applies to values allocated with
.B caml_alloc_custom_mem
(e.g. bigarrays).
Default: 100.
.TP
.BR n \ (custom_minor_max_size)
Maximum amount of out-of-heap
memory for each custom value allocated in the minor heap. When a custom
Expand All @@ -235,6 +202,31 @@ The limit (in words) of the stack size.
(e.g. bigarrays).
Default: 8192 bytes.
.TP
.BR o \ (space_overhead)
The major GC speed setting.
.TP
.BR O \ (max_overhead)
The heap compaction trigger setting.
.TP
.B p
Turn on debugging support for
.BR ocamlyacc -generated
parsers. When this option is on,
the pushdown automaton that executes the parsers prints a
trace of its actions. This option takes no argument.
.TP
.BR R
Turn on randomization of all hash tables by default (see the
.B Hashtbl
module of the standard library). This option takes no
argument.
.TP
.BR s \ (minor_heap_size)
The size of the minor heap (in words).
.TP
.B t
Sets the trace level for the debug runtime (ignored otherwise).
.TP
.BR v \ (verbose)
What GC messages to print to stderr. This is a sum of values selected
from the following:
Expand Down Expand Up @@ -272,6 +264,14 @@ Startup messages (loading the bytecode executable file, resolving

.BR 0x400
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
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.)

The multiplier is
.BR k ,
Expand Down
98 changes: 49 additions & 49 deletions manual/src/cmds/runtime.etex
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ The following environment variables are also consulted:
section~\ref{Gc}.
\fi
\begin{options}
\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
policy, and "2" for the best-fit policy. The default is "2" (best-fit).
See the Gc module documentation for details.
\item[b] (backtrace) Trigger the printing of a stack backtrace
when an uncaught exception aborts the program. An optional argument can
be provided: "b=0" turns backtrace printing off; "b=1" is equivalent to
Expand All @@ -125,6 +130,45 @@ The following environment variables are also consulted:
startup time instead of at backtrace printing time. "b=2" can be used if
the runtime is unable to load debugging information at backtrace
printing time, for example if there are no file descriptors available.
\item[c] ("cleanup_on_exit") Shut the runtime down gracefully on exit (see
"caml_shutdown" in section~\ref{ss:c-embedded-code}). The option also enables
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
memory, and are not swapped.
\item[i] ("major_heap_increment") Default size increment for the
major heap. (in words)
\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.
\item[m] ("custom_minor_ratio") Bound on floating garbage for
out-of-heap memory
held by custom values in the minor heap. A minor GC is triggered
when this much memory is held by custom values located in the minor
heap. Expressed as a percentage of minor heap size. Default:
100. Note: this only applies to values allocated with
"caml_alloc_custom_mem".
\item[M] ("custom_major_ratio") Target ratio of floating garbage to
major heap size for out-of-heap memory held by custom values
(e.g. bigarrays) located in the major heap. The GC speed is adjusted
to try to use this much memory for dead values that are not yet
collected. Expressed as a percentage of major heap size. Default:
44. Note: this only applies to values allocated with
"caml_alloc_custom_mem".
\item[n] ("custom_minor_max_size") Maximum amount of out-of-heap
memory for each custom value allocated in the minor heap. When a custom
value is allocated on the minor heap and holds more than this many
bytes, only this value is counted against "custom_minor_ratio" and
the rest is directly counted against "custom_major_ratio".
Default: 8192 bytes. Note:
this only applies to values allocated with "caml_alloc_custom_mem".
\end{options}
The multiplier is "k", "M", or "G", for multiplication by $2^{10}$,
$2^{20}$, and $2^{30}$ respectively.
\item[o] ("space_overhead") The major GC speed setting.
See the Gc module documentation for details.
\item[O] ("max_overhead") The heap compaction trigger setting.
\item[p] (parser trace) Turn on debugging support for
"ocamlyacc"-generated parsers. When this option is on,
the pushdown automaton that executes the parsers prints a
Expand All @@ -137,28 +181,8 @@ 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.)
\item[t] Sets the trace level for the debug runtime (ignored otherwise).
\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
policy, and "2" for the best-fit policy. The default is "2" (best-fit).
See the Gc module documentation for details.
\item[s] ("minor_heap_size") Size of the minor heap. (in words)
\item[i] ("major_heap_increment") Default size increment for the
major heap. (in words)
\item[o] ("space_overhead") The major GC speed setting.
See the Gc module documentation for details.
\item[O] ("max_overhead") The heap compaction trigger setting.
\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.
\item[t] Sets the trace level for the debug runtime (ignored otherwise).
\item[v] ("verbose") What GC messages to print to stderr. This
is a sum of values selected from the following:
\begin{options}
Expand All @@ -175,34 +199,10 @@ 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[c] ("cleanup_on_exit") Shut the runtime down gracefully on exit (see
"caml_shutdown" in section~\ref{ss:c-embedded-code}). The option also enables
pooling (as in "caml_startup_pooled"). This mode can be used to detect
leaks with a third-party memory debugger.
\item[M] ("custom_major_ratio") Target ratio of floating garbage to
major heap size for out-of-heap memory held by custom values
(e.g. bigarrays) located in the major heap. The GC speed is adjusted
to try to use this much memory for dead values that are not yet
collected. Expressed as a percentage of major heap size. Default:
44. Note: this only applies to values allocated with
"caml_alloc_custom_mem".
\item[m] ("custom_minor_ratio") Bound on floating garbage for
out-of-heap memory
held by custom values in the minor heap. A minor GC is triggered
when this much memory is held by custom values located in the minor
heap. Expressed as a percentage of minor heap size. Default:
100. Note: this only applies to values allocated with
"caml_alloc_custom_mem".
\item[n] ("custom_minor_max_size") Maximum amount of out-of-heap
memory for each custom value allocated in the minor heap. When a custom
value is allocated on the minor heap and holds more than this many
bytes, only this value is counted against "custom_minor_ratio" and
the rest is directly counted against "custom_major_ratio".
Default: 8192 bytes. Note:
this only applies to values allocated with "caml_alloc_custom_mem".
\end{options}
The multiplier is "k", "M", or "G", for multiplication by $2^{10}$,
$2^{20}$, and $2^{30}$ respectively.
\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.)

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

0 comments on commit 0eeb6a5

Please sign in to comment.