Up

Module Stat

Signature

type t = {
minor_words
: float ; (* Number of words allocated in the minor heap since the program was started. This number is accurate in byte-code programs, but only an approximation in programs compiled to native code. *)
promoted_words
: float ; (* Number of words allocated in the minor heap that survived a minor collection and were moved to the major heap since the program was started. *)
major_words
: float ; (* Number of words allocated in the major heap, including the promoted words, since the program was started. *)
minor_collections
: int ; (* Number of minor collections since the program was started. *)
major_collections
: int ; (* Number of major collection cycles completed since the program was started. *)
heap_words
: int ; (* Total size of the major heap, in words. *)
heap_chunks
: int ; (* Number of contiguous pieces of memory that make up the major heap. *)
live_words
: int ; (* Number of words of live data in the major heap, including the header words. *)
live_blocks
: int ; (* Number of live blocks in the major heap. *)
free_words
: int ; (* Number of words in the free list. *)
free_blocks
: int ; (* Number of blocks in the free list. *)
largest_free
: int ; (* Size (in words) of the largest block in the free list. *)
fragments
: int ; (* Number of wasted words due to fragmentation. These are 1-words free blocks placed between two live blocks. They are not available for allocation. *)
compactions
: int ; (* Number of heap compactions since the program was started. *)
top_heap_words
: int ; (* Maximum size reached by the major heap, in words. *)
stack_size
: int ; (* Current size of the stack, in words. *)
}
val stack_size : t -> int
val top_heap_words : t -> int
val compactions : t -> int
val fragments : t -> int
val largest_free : t -> int
val free_blocks : t -> int
val free_words : t -> int
val live_blocks : t -> int
val live_words : t -> int
val heap_chunks : t -> int
val heap_words : t -> int
val major_collections : t -> int
val minor_collections : t -> int
val major_words : t -> float
val promoted_words : t -> float
val minor_words : t -> float
module Fields : sig .. end
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_writer_t : t Bin_prot.Type_class.writer
include Core_kernel.Comparable.S with type t := t
include Comparable_intf.S_common
include Comparable_intf.Polymorphic_compare
include Polymorphic_compare_intf.Infix
type t
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int

ascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~cmp:ascending and List.sort ~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.

val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t

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 Or_error.t
include Comparator.S with type t := t
type t
type comparator_witness
include Comparable_intf.Validate with type t := t
type t
val validate_lbound : min:t Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Maybe_bound.t -> t Validate.check
val validate_bound : min:t Maybe_bound.t -> max:t Maybe_bound.t -> t Validate.check