Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val create : int -> _ t
create n
is a heap that holds at most n
elements.
alloc t a ~extra_data
adds the value a
to t
and returns a pointer to that value, or raises No_space
if no space exists in t
.
free t p
returns the element referenced by p
and removes it from the heap. Has undefined behaviour if p
has already been freed.
val in_use : 'a t -> int
in_use t
is the number of entries currently allocated.