Barrelfish
Functions
pinned.c File Reference

Managing the pinned memory for vspace metadata. More...

Functions

errval_t vspace_pinned_init (void)
 Initialize the pinned region. More...
 
errval_t vspace_pinned_alloc (void **retbuf, enum slab_type slab_type)
 Allocate some slabs. More...
 

Detailed Description

Managing the pinned memory for vspace metadata.

Warning: This code is coupled with code in slot_alloc/. and pmap_*.

Slabs required for various lists in vspace and memobj are backed by this memobj. This memory is pinned since the frames are not tracked and cannot be mapped into multiple vregions.

If the slabs maintained in the state are out of memory, it needs to be grown. This file will require 1 slot for frame capability and additional to create the mappings. The amount required can be calculated by refering to the pmap_*.

Growing requires 1 slot from this file.

Function Documentation

errval_t vspace_pinned_alloc ( void **  retbuf,
enum slab_type slab_type   
)

Allocate some slabs.

Parameters
retbufPointer to return the allocated memory
slab_typeType of slab the memory is allocated for

Since this region is used for backing specific slabs, only those types of slabs can be allocated.

errval_t vspace_pinned_init ( void  )

Initialize the pinned region.

Allocates a region of virtual address space and initializes its state.