VMEM_WALK(9F) Kernel Functions for Drivers VMEM_WALK(9F)
NAME
vmem_walk,
vmem_size - walk a (sub-)set of the segments in a vmem arena
SYNOPSIS
#include <sys/vmem.h> void vmem_walk(
vmem_t *vmp,
int typemask,
void (*func)(void *, void *, size_t),
void *arg);
size_t vmem_size(
vmem_t *vmp,
int typemask);
INTERFACE LEVEL
illumos DDI specific
PARAMETERS
vmp The vmem arena to walk.
typemask A bitmask indicating the types of segment to operate on.
VMEM_ALLOC
Allocated segments.
VMEM_FREE
Free segments.
func The function to apply to each segment matching
typemask.
func should accept 3 arguments and return void:
void *arg The
arg passed to
vmem_walk().
void *vaddr The base address of the segment.
size_t size The size of the segment.
arg An arbitrary argument passed to each call to
func().
DESCRIPTION
vmem_walk() walks each segment in the arena
vmp and applies
func to
each which matches
typemask.
vmem_size() walks each segment in the arena
vmp and totals the size of
each matching
typemask.
CONTEXT
This function may be called from user or kernel context.
SEE ALSO
vmem(9),
vmem_alloc(9F),
vmem_create(9F)illumos January 18, 2017 illumos