pub unsafe fn create_mem_arena(
    mem: *mut iovec,
    max_blocks: u32
) -> *mut mem_arena
Expand description

Creates a new memory arena within a given block of memory. Returns the memory arena.

Arguments

  • mem - memory region in which to create the arena, as {pointer, length}
  • max_blocks - maximum number of blocks that the arena can hold

Safety

mem must be a valid pointer + length to an unused memory location. max_blocks must fit into the length of mem.