Skip to content

Module Gc.Tweak

GC Tweaks are unstable and undocumented configurable GC parameters, primarily intended for use by GC developers.

As well as using Gc.Tweak.set "foo" 42, they can also be configured in OCAMLRUNPARAM, using the following syntax:

OCAMLRUNPARAM='Xfoo=42'

Additionally, OCAMLRUNPARAM=Xhelp will show the available GC tweaks.

since 5.5

ocaml
val set : string -> int -> unit
reasonml
let set: string => int => unit;

Change a parameter. Raises Invalid_argument if no such parameter exists

ocaml
val get : string -> int
reasonml
let get: string => int;

Retrieve a parameter value. Raises Invalid_argument if no such parameter exists

ocaml
val list_active : unit -> (string * int) list
reasonml
let list_active: unit => list((string, int));

Returns the list of parameters and their values that currently have non-default values