package jemalloc

  1. Overview
  2. Docs
On This Page
  1. malloc interface
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module JemallocSource

Bindings to jemalloc. Monitor memory usage and control behaviour of jemalloc.

malloc interface

Sourceval release_free_memory : unit -> unit

Release as much memory as possible to operating system

Sourceexception Invalid_property of string
Sourceval version : unit -> string * int * int * string
  • returns

    version information: (human-readable string, major, minor, git version)

Sourceval mallctl_bool : string -> bool option -> bool
Sourceval mallctl_int : string -> int option -> int
Sourceval mallctl_string : string -> string option -> string
Sourceval mallctl_unit : string -> unit
Sourcetype memory_stats = {
  1. active : int;
  2. resident : int;
  3. allocated : int;
  4. mapped : int;
}
Sourceval epoch : unit -> unit

epoch counter for the stats. Statistics are frozen to a snapshot value until the next epoch call refresh the snapshot

Sourceval get_stat : string -> int
  • returns

    stat counter from the "stats." mallctl prefix during current epoch

Sourceval get_memory_stats : unit -> memory_stats

refresh epoch and gather memory statistics

  • returns

    memory_stats

OCaml

Innovation. Community. Security.