NAME
ARENA_VECTOR_INIT,
ARENA_VECTOR_ALLOC,
ARENA_VECTOR_CALLOC —
arena allocated vector
structure
SYNOPSIS
#include
<libks/arena-vector.h>
void
ARENA_VECTOR_INIT(struct
arena_scope *scope, type
*v, size_t
len);
type *
ARENA_VECTOR_ALLOC(type
*v);
type *
ARENA_VECTOR_CALLOC(type
*v);
DESCRIPTION
The
ARENA_VECTOR_INIT()
function behaves like
VECTOR_INIT()
with the exception of allocating the vector from an arena. The vector will
have an initial capacity of at least len elements.
The
ARENA_VECTOR_ALLOC()
function behaves like
VECTOR_ALLOC()
but is guaranteed to never return NULL. In case of
failure, the process is terminated.
The
ARENA_VECTOR_CALLOC()
function behaves like
VECTOR_CALLOC()
but is guaranteed to never return NULL. In case of
failure, the process is terminated.
SEE ALSO
AUTHORS
Anton Lindqvist <anton@basename.se>