module Malloc:sig
..end
Allows you to set/query the behaviour of malloc. The functions in this
module may not be implemented on your platform.
Allows you to set/query the behaviour of malloc. The functions in this
module may not be implemented on your platform.
type
mallinfo = {
|
arena : |
(* | non-mmapped space allocated from system | *) |
|
ordblks : |
(* | number of free chunks | *) |
|
smblks : |
(* | number of fastbin blocks | *) |
|
hblks : |
(* | number of mmapped regions | *) |
|
hblkhd : |
(* | space in mmapped regions | *) |
|
usmblks : |
(* | maximum total allocated space | *) |
|
fsmblks : |
(* | space available in freed fastbin blocks | *) |
|
uordblks : |
(* | total allocated space | *) |
|
fordblks : |
(* | total free space | *) |
|
keepcost : |
(* | top-most, releasable (via malloc_trim) space | *) |
type
opt =
| |
TRIM_THRESHOLD |
(* | Maximum amount of unused top-most memory to keep before releasing via malloc_trim in free(). | *) |
| |
TOP_PAD |
(* | Amount of extra `padding' space to allocate or retain whenever sbrk is called. | *) |
| |
MMAP_THRESHOLD |
(* | Request size threshold for using mmap() to service a request. Requests of at least this size that cannot be allocated using already-existing space will be serviced via mmap. | *) |
| |
MMAP_MAX |
(* | Maximum number of requests to simultaneously service using mmap. | *) |
| |
CHECK_ACTION |
(* | ??? | *) |
val mallinfo : (unit -> mallinfo) Core.Std.Or_error.t
val mallopt : (opt -> int -> unit) Core.Std.Or_error.t
mallopt opt n
sets malloc configuration option opt
to n
.val malloc_trim : (int -> unit) Core.Std.Or_error.t
malloc_trim n
release all but n
bytes of freed top-most memory
back to the system.Failure
if unsuccessful.val malloc_stats : (unit -> unit) Core.Std.Or_error.t
malloc_stats ()
prints brief summary statistics on stderr.val bin_mallinfo : mallinfo Bin_prot.Type_class.t
val bin_read_mallinfo : mallinfo Bin_prot.Read_ml.reader
val bin_read_mallinfo_ : mallinfo Bin_prot.Unsafe_read_c.reader
val bin_read_mallinfo__ : (int -> mallinfo) Bin_prot.Unsafe_read_c.reader
val bin_reader_mallinfo : mallinfo Bin_prot.Type_class.reader
val bin_size_mallinfo : mallinfo Bin_prot.Size.sizer
val bin_write_mallinfo : mallinfo Bin_prot.Write_ml.writer
val bin_write_mallinfo_ : mallinfo Bin_prot.Unsafe_write_c.writer
val bin_writer_mallinfo : mallinfo Bin_prot.Type_class.writer
val mallinfo_of_sexp : Sexplib.Sexp.t -> mallinfo
val sexp_of_mallinfo : mallinfo -> Sexplib.Sexp.t
val bin_opt : opt Bin_prot.Type_class.t
val bin_read_opt : opt Bin_prot.Read_ml.reader
val bin_read_opt_ : opt Bin_prot.Unsafe_read_c.reader
val bin_read_opt__ : (int -> opt) Bin_prot.Unsafe_read_c.reader
val bin_reader_opt : opt Bin_prot.Type_class.reader
val bin_size_opt : opt Bin_prot.Size.sizer
val bin_write_opt : opt Bin_prot.Write_ml.writer
val bin_write_opt_ : opt Bin_prot.Unsafe_write_c.writer
val bin_writer_opt : opt Bin_prot.Type_class.writer
val opt_of_sexp : Sexplib.Sexp.t -> opt
val sexp_of_opt : opt -> Sexplib.Sexp.t