Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Vmem_alloc Class Reference

#include <vmem_alloc.h>

List of all members.

Public Types

enum  Zero_fill { NO_ZERO_FILL = 0, ZERO_FILL, ZERO_MAP }

Static Public Member Functions

static void init ()
static void * page_alloc (void *address, Zero_fill zf=NO_ZERO_FILL, Page::Attribs pa=Page::USER_NO)
 Allocate a page of kernel memory and insert it into the master page directory.
static void page_free (void *page)
 Free the page at the given virtual address.
static void * page_attr (void *address, Page::Attribs pa)
 Set the page attributes of an already existing page of kernel memory.
static bool local_alloc (Space *space, Address virt_addr, int size, unsigned int page_attributes)
 Allocate size pages of kernel memory and map it sequentially to the given address space, starting at virt_addr.
static void local_free (Space *space, Address virt_addr, int size)
 Free the sequentially mapped memory in the given address space, starting at virt_addr.

Static Private Member Functions

static void page_map (void *address, int order, Zero_fill zf, Address phys)
static void page_unmap (void *address, int size)

Static Private Attributes

static P_ptr< void > zero_page


Member Enumeration Documentation

enum Vmem_alloc::Zero_fill
 

Enumeration values:
NO_ZERO_FILL 
ZERO_FILL  Fill the page with zeroes.
ZERO_MAP  Allocate nothing but map the global zero page.


Member Function Documentation

FIASCO_INIT void Vmem_alloc::init  )  [static]
 

bool Vmem_alloc::local_alloc Space space,
Address  virt_addr,
int  size,
unsigned int  page_attributes
[static]
 

Allocate size pages of kernel memory and map it sequentially to the given address space, starting at virt_addr.

Parameters:
space Target address space.
virt_addr Virtual start address.
size Size in pages.
page_attributes Page table attributes per allocated page.
See also:
local_free()

void Vmem_alloc::local_free Space space,
Address  virt_addr,
int  size
[static]
 

Free the sequentially mapped memory in the given address space, starting at virt_addr.

The page table in the address space is not deleted.

Parameters:
space Target address space.
virt_addr Virtual start address.
size Size in pages.
See also:
local_alloc()

void * Vmem_alloc::page_alloc void *  address,
Zero_fill  zf = NO_ZERO_FILL,
Page::Attribs  pa = Page::USER_NO
[static]
 

Allocate a page of kernel memory and insert it into the master page directory.

Parameters:
address the virtual address where to map the page.
zf zero fill or zero map.
pa page attributes to use for the page table entry.

void * Vmem_alloc::page_attr void *  address,
Page::Attribs  pa
[static]
 

Set the page attributes of an already existing page of kernel memory.

Parameters:
address the virtual address where the page is mapped.
pa page attributes to use for the page table entry.

void Vmem_alloc::page_free void *  page  )  [inline, static]
 

Free the page at the given virtual address.

If kernel memory was mapped at this page, deallocate the kernel memory as well.

Parameters:
page Virtual address of the page to free.

void Vmem_alloc::page_map void *  address,
int  order,
Zero_fill  zf,
Address  phys
[inline, static, private]
 

void Vmem_alloc::page_unmap void *  address,
int  size
[inline, static, private]
 


Member Data Documentation

P_ptr<void> Vmem_alloc::zero_page [static, private]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 26 14:20:18 2005 for Fiasco by  doxygen 1.4.2