Memory allocation.
Memory allocation interface.
get n allocates and returns a memory block of n pages. If
there is not enough memory, an Out_of_memory exception is
raised. Note that this may be a recoverable situation, since
this function allocates memory from a page-aligned pool, whereas
the OCaml garbage collector will be running in its own heap that
may have spare memory despite the Out_of_memory being raised
from this function call.
pages n allocates a memory block of n pages and return the
list of pages allocated.
pages n allocates a memory block of n pages and return the the
list of pages allocated.
to_string t will allocate a fresh string and copy the contents of t
into the string.
string_blit src srcoff dst dstoff len copies len bytes from
string src, starting at byte number srcoff, to memory block
dst, starting at byte number dstoff.
round_to_page_size n returns the number of bytes that will be
allocated for storing n bytes in memory