Barrelfish
Data Structures | Functions | Variables
slot_alloc.h File Reference

Slot management for memory allocator. More...

Data Structures

struct  slot_prealloc
 Instance data for pre-allocating slot allocator for 2 level cspace. More...
 
struct  slot_alloc_basecn
 Instance data for simple base-cnode allocator. More...
 

Functions

errval_t slot_alloc_prealloc (void *inst, uint64_t nslots, struct capref *ret)
 Implementations of above interface.
 
errval_t slot_alloc_dynamic (void *inst, uint64_t nslots, struct capref *ret)
 Requires an instance of range_slot_allocator.
 
errval_t slot_prealloc_init (struct slot_prealloc *slot_alloc, uint8_t maxslotbits, struct capref initial_cnode, uint64_t initial_space, struct mm *ram_mm)
 Initialiser for the pre-allocating implementation. More...
 
errval_t slot_prealloc_refill (struct slot_prealloc *inst)
 Refill function for the pre-allocating implementation. More...
 
errval_t slot_alloc_basecn_init (struct slot_alloc_basecn *slot_alloc)
 Initialiser for the single-cnode implementation.
 

Variables

__BEGIN_DECLS typedef errval_t(* slot_alloc_t )(void *inst, uint64_t nslots, struct capref *ret)
 Generic interface to slot allocator function.
 

Detailed Description

Slot management for 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 
)

Initialiser for the pre-allocating implementation.

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)

Refill function for the pre-allocating implementation.

Refill function for the pre-allocating implementation.