Gc.Controltype t = {mutable minor_heap_size : Base.Int.t; | (* The size (in words) of the minor heap. Changing this parameter will trigger a minor collection. Default: 262144 words / 1MB (32bit) / 2MB (64bit). *) |
mutable major_heap_increment : Base.Int.t; | (* How much to add to the major heap when increasing it. If this number is less than or equal to 1000, it is a percentage of the current heap size (i.e. setting it to 100 will double the heap size at each increase). If it is more than 1000, it is a fixed number of words that will be added to the heap. Default: 15%. *) |
mutable space_overhead : Base.Int.t; | (* The major GC speed is computed from this parameter. This is the memory that will be "wasted" because the GC does not immediately collect unreachable blocks. It is expressed as a percentage of the memory used for live data. The GC will work more (use more CPU time and collect blocks more eagerly) if Default: 80. *) |
mutable verbose : Base.Int.t; | (* This value controls the GC messages on standard error output. It is a sum of some of the following flags, to print messages on the corresponding events:
Default: 0. *) |
mutable max_overhead : Base.Int.t; | (* Heap compaction is triggered when the estimated amount of "wasted" memory is more than Default: 500. *) |
mutable stack_limit : Base.Int.t; | (* The maximum size of the stack (in words). This is only relevant to the byte-code runtime, as the native code runtime uses the operating system's stack. Default: 1048576 words / 4MB (32bit) / 8MB (64bit). *) |
mutable allocation_policy : Base.Int.t; | (* The policy used for allocating in the heap. Possible values are 0 and 1. 0 is the next-fit policy, which is quite fast but can result in fragmentation. 1 is the first-fit policy, which can be slower in some cases but can be better for programs with fragmentation problems. Default: 0. *) |
window_size : Base.Int.t; | (* The size of the window used by the major GC for smoothing out variations in its workload. This is an integer between 1 and 50. Default: 1. *) |
custom_major_ratio : Base.Int.t; | (* Target ratio of floating garbage to major heap size for out-of-heap memory held by custom values 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. The default value keeps the out-of-heap floating garbage about the same size as the in-heap overhead. Note: this only applies to values allocated with |
custom_minor_ratio : Base.Int.t; | (* 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 |
custom_minor_max_size : Base.Int.t; | (* 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 |
}include Bin_prot.Binable.S with type t := tinclude Bin_prot.Binable.S_only_functions with type t := tval bin_size_t : t Bin_prot.Size.sizerval bin_write_t : t Bin_prot.Write.writerval bin_read_t : t Bin_prot.Read.readerval __bin_read_t__ : (int -> t) Bin_prot.Read.readerThis function only needs implementation if t exposed to be a polymorphic variant. Despite what the type reads, this does *not* produce a function after reading; instead it takes the constructor tag (int) before reading and reads the rest of the variant t afterwards.
val bin_shape_t : Bin_prot.Shape.tval bin_writer_t : t Bin_prot.Type_class.writerval bin_reader_t : t Bin_prot.Type_class.readerval bin_t : t Bin_prot.Type_class.tinclude Ppx_sexp_conv_lib.Sexpable.S with type t := tval t_of_sexp : Sexplib0.Sexp.t -> tval sexp_of_t : t -> Sexplib0.Sexp.tval custom_minor_max_size : t -> Base.Int.tval custom_minor_ratio : t -> Base.Int.tval custom_major_ratio : t -> Base.Int.tval window_size : t -> Base.Int.tval allocation_policy : t -> Base.Int.tval set_allocation_policy : t -> Base.Int.t -> Base.Unit.tval stack_limit : t -> Base.Int.tval set_stack_limit : t -> Base.Int.t -> Base.Unit.tval max_overhead : t -> Base.Int.tval set_max_overhead : t -> Base.Int.t -> Base.Unit.tval verbose : t -> Base.Int.tval set_verbose : t -> Base.Int.t -> Base.Unit.tval space_overhead : t -> Base.Int.tval set_space_overhead : t -> Base.Int.t -> Base.Unit.tval major_heap_increment : t -> Base.Int.tval set_major_heap_increment : t -> Base.Int.t -> Base.Unit.tval minor_heap_size : t -> Base.Int.tval set_minor_heap_size : t -> Base.Int.t -> Base.Unit.tmodule Fields : sig ... endinclude Comparable.S with type t := tinclude Base.Comparable.S with type t := tinclude Base.Comparisons.S with type t := tcompare t1 t2 returns 0 if t1 is equal to t2, a negative integer if t1 is less than t2, and a positive integer if t1 is greater than t2.
ascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~compare:ascending and List.sort
~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.
clamp_exn t ~min ~max returns t', the closest value to t such that between t' ~low:min ~high:max is true.
Raises if not (min <= max).
val clamp : t -> min:t -> max:t -> t Base.Or_error.tinclude Base.Comparator.S with type t := tval comparator : (t, comparator_witness) Base.Comparator.comparatorval validate_lbound : min:t Base.Maybe_bound.t -> t Base.Validate.checkval validate_ubound : max:t Base.Maybe_bound.t -> t Base.Validate.checkval validate_bound : min:t Base.Maybe_bound.t -> max:t Base.Maybe_bound.t -> t Base.Validate.checkmodule Replace_polymorphic_compare : Base.Comparable.Polymorphic_compare with type t := tmodule Map : Map.S with type Key.t = t with type Key.comparator_witness = comparator_witnessmodule Set : Set.S with type Elt.t = t with type Elt.comparator_witness = comparator_witness