pgalloc.h File Reference

#include <libc.h>

Go to the source code of this file.

Data Structures

struct  s_pgblock
struct  s_pgset
struct  s_pgchunk


#define __CONVEN_PGALLOC_H__   1
#define PGBLOCK_MAGIC   0x42aabbcc
#define PGSET_MAGIC   0x43ddeeff
#define PGCHUNK_MAGIC   0x44001122


typedef s_pgblock t_pgblock
typedef s_pgset t_pgset
typedef s_pgchunk t_pgchunk


vaddr_t pgalloc2 (asid_t asid, paddr_t fixed_pa, int nb_pgs, paddr_t *pa_returned)
vaddr_t pgalloc (asid_t asid, int nb_pgs)
int pgfree (asid_t asid, vaddr_t vpages, int nb_pgs)
int ppgalloc (asid_t asid, int nb_pgs, paddr_t *pa_returned, int *nb_pgs_returned)
int bigfree (t_pgset *set)
t_pgsetbigalloc (asid_t asid, int nb_pgs)
void bigdump (t_pgset *set)

Define Documentation

#define __CONVEN_PGALLOC_H__   1

#define PGBLOCK_MAGIC   0x42aabbcc

#define PGCHUNK_MAGIC   0x44001122

#define PGSET_MAGIC   0x43ddeeff

Typedef Documentation

typedef struct s_pgblock t_pgblock

typedef struct s_pgchunk t_pgchunk

typedef struct s_pgset t_pgset

Function Documentation

t_pgset* bigalloc asid_t  asid,
int  nb_pgs

allocate a huge virtual zone composed of many small physical zones

void bigdump t_pgset set  ) 


int bigfree t_pgset set  ) 

vaddr_t pgalloc asid_t  asid,
int  nb_pgs

alloc phys pages + vpages and vmap them

vaddr_t pgalloc2 asid_t  asid,
paddr_t  fixed_pa,
int  nb_pgs,
paddr_t pa_returned

same thing as pgalloc(3) excepted that it is possible to specify a fixed paddr and also retrieve physical addr choosem. pa_returned might be NULL.

int pgfree asid_t  asid,
vaddr_t  vpages,
int  nb_pgs

int ppgalloc asid_t  asid,
int  nb_pgs,
paddr_t pa_returned,
int *  nb_pgs_returned

try to alloc nb_pgs or less

Generated on Wed May 24 23:05:54 2006 for LSE/OS by  doxygen 1.4.6