Barrelfish
Functions
slot_alloc.c File Reference

Slot management for the memory allocator. More...

Functions

errval_t slot_prealloc_refill (struct slot_prealloc *this)
 Allocate a new cnode if needed. More...
 
errval_t slot_alloc_prealloc (void *inst, uint64_t nslots, struct capref *ret)
 Implementations of above interface.
 
errval_t slot_prealloc_init (struct slot_prealloc *this, uint8_t maxslotbits, struct capref initial_cnode, uint64_t initial_space, struct mm *ram_mm)
 Initialise preallocating slot allocator instance. More...
 
errval_t slot_alloc_basecn_init (struct slot_alloc_basecn *this)
 Initialiser for the single-cnode implementation.
 
errval_t slot_alloc_dynamic (void *alloc, uint64_t nslots, struct capref *ret)
 Requires an instance of range_slot_allocator.
 

Detailed Description

Slot management for the memory allocator.

Function Documentation

errval_t slot_prealloc_init ( struct slot_prealloc this,
uint8_t  maxslotbits,
struct capref  initial_cnode,
uint64_t  initial_space,
struct mm ram_mm 
)

Initialise preallocating slot allocator instance.

Initialiser for the pre-allocating implementation.

Parameters
thisPointer to area for instance data
maxslotbitsMaximum size of each allocation (in bits)
initial_cnodeFirst cap in an empty cnode to start allocating from
initial_spaceNumber of slots free in initial cnode
ram_mmMemory allocator to use for RAM caps when creating new CNodes
errval_t slot_prealloc_refill ( struct slot_prealloc this)

Allocate a new cnode if needed.

Refill function for the pre-allocating implementation.