VMEM_ADD(9F) Kernel Functions for Drivers VMEM_ADD(9F)
NAME
vmem_add - add spans to a vmem arena
SYNOPSIS
#include <sys/vmem.h> void * vmem_add(
vmem_t *vmp,
void *vaddr,
size_t size,
int vmflag);
INTERFACE LEVEL
illumos DDI specific
PARAMETERS
vmp The vmem arena to which the span should be added.
vaddr The base address of the span to add.
size The size of the span to add.
vmflag Flags affecting the allocation of the span to add.
DESCRIPTION
The
vmem_add() function adds
size bytes starting at
vaddr to a vmem
arena from which future calls to
vmem_alloc() may allocate.
VM_SLEEP or VM_NOSLEEP must be specified in
vmflag, and indicate
whether the addition may block.
CONTEXT
This function can be called from either user or kernel context. If the
VM_NOSLEEP flag is specified, it may also be called from interrupt
context.
RETURN VALUES
Upon success
vmem_add() returns
vaddr. On failure, NULL is returned.
SEE ALSO
vmem(9),
vmem_alloc(9F),
vmem_create(9F)illumos January 18, 2017 illumos