Barrelfish
Functions
range_slot_alloc.c File Reference

Slot allocator capable of allocating more than one slot at a time. More...

Functions

errval_t range_slot_alloc (struct range_slot_allocator *alloc, cslot_t nslots, struct capref *ret)
 Allocate slots out of a cnode. More...
 
errval_t range_slot_free (struct range_slot_allocator *alloc, struct capref cap, cslot_t nslots)
 Free slots belonging to the cnode. More...
 
errval_t range_slot_alloc_init (struct range_slot_allocator *ret, cslot_t nslots, cslot_t *retslots)
 Constructor for a new instance of a single cnode cspace_allocator. More...
 

Detailed Description

Slot allocator capable of allocating more than one slot at a time.

Function Documentation

errval_t range_slot_alloc ( struct range_slot_allocator *  alloc,
cslot_t  nslots,
struct capref ret 
)

Allocate slots out of a cnode.

Parameters
allocPointer to the metadata
nslotsNumber of slots to allocate
retPointer used to return the allocated slot
errval_t range_slot_alloc_init ( struct range_slot_allocator *  ret,
cslot_t  nslots,
cslot_t *  retslots 
)

Constructor for a new instance of a single cnode cspace_allocator.

Parameters
retInstance of the allocator created
nslotsDesired number of slots the cnode should have
ret_slotsNumber of slots actually used
errval_t range_slot_free ( struct range_slot_allocator *  alloc,
struct capref  cap,
cslot_t  nslots 
)

Free slots belonging to the cnode.

Parameters
allocPointer to the metadata
capSlot to start freeing from
nslotsNumber of slots to free