vmem_addr_t
vmem_alloc(
vmem_t *vm
, vmem_size_t size
, vm_flag_t flags
)
)
allocates a resource from the arena.
vm
size
flags
The allocation strategy is one of:
VM_BESTFIT
VM_INSTANTFIT
The sleep flag should be one of:
VM_SLEEP
VM_NOSLEEP
VMEM_ADDR_NULL
if there are not enough resources available.
)
returns an allocated vmem_addr_t.
Otherwise, it returns
VMEM_ADDR_NULL
.