vmem_alloc(9) - NetBSD Manual Pages

VMEM_ALLOC(9)          NetBSD Kernel Developer's Manual          VMEM_ALLOC(9)


NAME
vmem_alloc -- Allocate resource from arena
SYNOPSIS
#include <sys/vmem.h> vmem_addr_t vmem_alloc(vmem_t *vm, vmem_size_t size, vm_flag_t flags);
DESCRIPTION
vmem_alloc() allocates a resource from the arena. vm The arena which we allocate from. size Specify the size of the allocation. flags A bitwise OR of an allocation strategy and a sleep flag. The allocation strategy is one of: VM_BESTFIT Prefer space efficiency. VM_INSTANTFIT Prefer performance. The sleep flag should be one of: VM_SLEEP Can sleep until enough resources are available. VM_NOSLEEP Don't sleep. Immediately return VMEM_ADDR_NULL if there are not enough resources available.
RETURN VALUES
On success, vmem_alloc() returns an allocated vmem_addr_t. Otherwise, it returns VMEM_ADDR_NULL.
SEE ALSO
intro(9), vmem(9) NetBSD 5.0.1 October 22, 2006 NetBSD 5.0.1

Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.