Barrelfish
Data Structures | Functions
vspace_mmu_aware.h File Reference

Data Structures

struct  vspace_mmu_aware
 Struct to support mmu_aware memory management. More...
 

Functions

errval_t vspace_mmu_aware_init (struct vspace_mmu_aware *state, size_t size)
 Initialize vspace_mmu_aware struct. More...
 
errval_t vspace_mmu_aware_map (struct vspace_mmu_aware *state, size_t req_size, void **retbuf, size_t *retsize)
 Create mappings. More...
 

Function Documentation

errval_t vspace_mmu_aware_init ( struct vspace_mmu_aware state,
size_t  size 
)

Initialize vspace_mmu_aware struct.

Parameters
stateThe struct to initialize
initThe buffer to use to initialize the struct
sizeThe size of anon memobj to create

Initializes the struct according to the type of MMU

errval_t vspace_mmu_aware_map ( struct vspace_mmu_aware state,
size_t  req_size,
void **  retbuf,
size_t *  retsize 
)

Create mappings.

Parameters
stateThe object metadata
frameAn empty slot to place the frame capability in
req_sizeThe required amount by the application
retbufPointer to return the mapped buffer
retsizeThe actual size returned

This function will returns a special error code if frame_create fails due to the constrains to the memory server (amount of memory or region of memory). This is to facilitate retrying with different constraints.