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