Barrelfish
Functions
slot_alloc.c File Reference

Slot allocator wrapper. More...

Functions

struct slot_allocator * get_default_slot_allocator (void)
 Returns the default slot allocator for the caller.
 
errval_t slot_alloc (struct capref *ret)
 Default slot allocator. More...
 
errval_t slot_alloc_root (struct capref *ret)
 slot allocator for the root More...
 
errval_t slot_free (struct capref ret)
 Default slot free. More...
 

Detailed Description

Slot allocator wrapper.

Warning: slot_alloc_init calls vregion_map which calls vspace_add_vregion. vspace_add_vregion uses malloc to increase it's slab. Since malloc depends upon slot_alloc_init being called successfully, vspace_add_vregion should have enough initial slab space to not use malloc.

Function Documentation

errval_t slot_alloc ( struct capref *  ret)

Default slot allocator.

Parameters
retPointer to the cap to return the allocated slot in

Allocates one slot from the default allocator

errval_t slot_alloc_root ( struct capref *  ret)

slot allocator for the root

Root slot allocator functions.

Parameters
retPointer to the cap to return the allocated slot in

Allocates one slot from the root slot allocator

errval_t slot_free ( struct capref  ret)

Default slot free.

Parameters
retThe cap to free

Frees the passed in slot.