VMEM_ADD(9F) Kernel Functions for Drivers VMEM_ADD(9F)

vmem_addadd spans to a vmem arena

#include <sys/vmem.h>

void *
vmem_add(vmem_t *vmp, void *vaddr, size_t size, int vmflag);

illumos DDI specific

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.

The () function adds size bytes starting at vaddr to a vmem arena from which future calls to () may allocate.

VM_SLEEP or VM_NOSLEEP must be specified in vmflag, and indicate whether the addition may block.

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.

Upon success vmem_add() returns vaddr. On failure, NULL is returned.

vmem(9), vmem_alloc(9F), vmem_create(9F)

January 18, 2017 OmniOS