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

Region Class Reference

Region manager. More...

#include <region.h>

List of all members.

Static Public Member Functions

static void init (Address begin, Address end)
 Initialize the region manager.
static Address reserve_pages (size_t size, unsigned long alignment)
 Reserve an address region.
static void return_pages (Address address, size_t size)
 Free an address region.
static void debug_dump ()
 Dump an overview of current allocations to the screen.


Detailed Description

Region manager.

The region manager is a module that keeps track of virtual-memory allocations in a predefined virtual-address region. It only allocates virtual addresses -- not physical memory. In other words, virtual-memory regions allocated using this module are not backed by physical memory; mapping in physical memory is the client's responsibility.


Member Function Documentation

void Region::debug_dump  )  [static]
 

Dump an overview of current allocations to the screen.

void Region::init Address  begin,
Address  end
[static]
 

Initialize the region manager.

This function is called once at initialization.

Parameters:
begin begin of the virtual-memory region
end end of the virtual-memory region

Address Region::reserve_pages size_t  size,
unsigned long  alignment
[static]
 

Reserve an address region.

This function only reserves the region -- it does not back it with physical memory.

Parameters:
size size of the requested region, in bytes.
alignment size-alignment of the requested region, in bytes.
Returns:
virtual address of the allocated virtual-memory region, or 0 if an error occurred.

void Region::return_pages Address  address,
size_t  size
[static]
 

Free an address region.

This function only frees a reservation --- it does not flush the region itself.

Parameters:
address virtual address of the allocated virtual memory region.
size size of the allocated region, in bytes.


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