package mirage-types
Memory allocation interface.
Type of memory blocks.
val get : int -> t
get n
allocates and returns a memory block of n
pages. If there is not enough memory, the unikernel will terminate.
val get_order : int -> t
get_order i
is get (1 lsl i)
.
val pages : int -> t list
pages n
allocates a memory block of n
pages and return the the list of pages allocated.
val pages_order : int -> t list
pages_order i
is pages (1 lsl i)
.
val length : t -> int
length t
is the size of t
, in bytes.
val to_string : t -> string
to_pages t
is a list of size
memory blocks of one page each, where size
is the size of t
in pages.
val string_blit : string -> int -> t -> int -> int -> unit
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.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>