Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Zygoma::PageFrameTable Class Reference
[Kernel Physical Memory Management]

#include <pageframetable.h>

Collaboration diagram for Zygoma::PageFrameTable:

Collaboration graph
[legend]
List of all members.

Detailed Description

The PageFrameTable maps physical RAM into used and unused page frames.

It does this by associating a 16-bit integer with each (potential) page frame in physical RAM. The index of this 16-bit integer is the index of the page frame (using the underlying architecture's page frame size).


Public Types

STL-compatible typedefs.
typedef PageFrame value_type
typedef value_typepointer
typedef const value_typeconst_pointer
typedef value_typereference
typedef const value_typeconst_reference
typedef PageFrameTableIterator iterator
typedef const PageFrameTableIterator const_iterator
typedef PageFrameTableIterator::difference_type difference_type
typedef std::size_t size_type

Public Member Functions

size_type size () const
 Returns the size of the page frame table in bytes.
size_type max_size () const
 Returns the maximum possible size for the page table.
bool empty () const
 Indicates if the page frane table is empty.
Page Frame Access
iterator begin ()
 Returns the index of the first page frame with addressable memory.
const_iterator begin () const
iterator end ()
 Returns the index one-past-the-end of the page frame with the highest addressable memory.
const_iterator end () const
iterator find (PhysicalAddress address)
 Determines the page frame index of a physical address.
Comparison operations
bool equals (const PageFrameTable &rhs) const

Static Public Member Functions

static PageFrameTablecreate (PhysicalAddress base, PhysicalAddress himem)
 Creates the page frame table at a known address.

Friends

class PageFrameTableIterator


Member Typedef Documentation

typedef const PageFrameTableIterator Zygoma::PageFrameTable::const_iterator
 

typedef const value_type* Zygoma::PageFrameTable::const_pointer
 

typedef const value_type& Zygoma::PageFrameTable::const_reference
 

typedef PageFrameTableIterator::difference_type Zygoma::PageFrameTable::difference_type
 

typedef PageFrameTableIterator Zygoma::PageFrameTable::iterator
 

typedef value_type* Zygoma::PageFrameTable::pointer
 

typedef value_type& Zygoma::PageFrameTable::reference
 

typedef std::size_t Zygoma::PageFrameTable::size_type
 

typedef PageFrame Zygoma::PageFrameTable::value_type
 


Member Function Documentation

const_iterator Zygoma::PageFrameTable::begin  )  const
 

PageFrameTable::iterator PageFrameTable::begin  ) 
 

Returns the index of the first page frame with addressable memory.

PageFrameTable * PageFrameTable::create PhysicalAddress  base,
PhysicalAddress  himem
[static]
 

Creates the page frame table at a known address.

Construction of the page frame table is done through this factory function because at the point at which it's created, the actual size of the page frame table is unknown. It is calculated from the himem parameter, and the best place to put that calculation is inside the page frame table object itself.

Parameters:
base Address at which to create the page frame table.
himem The highest address to be mapped through the page frame table.

bool Zygoma::PageFrameTable::empty  )  const [inline]
 

Indicates if the page frane table is empty.

This function is supplied for compatibility with the C++ standard library.

const_iterator Zygoma::PageFrameTable::end  )  const
 

PageFrameTable::iterator PageFrameTable::end  ) 
 

Returns the index one-past-the-end of the page frame with the highest addressable memory.

bool Zygoma::PageFrameTable::equals const PageFrameTable rhs  )  const [inline]
 

PageFrameTable::iterator PageFrameTable::find PhysicalAddress  address  ) 
 

Determines the page frame index of a physical address.

Parameters:
address A physical memory address.
Returns:
The index of the page frame containing the address.

size_type Zygoma::PageFrameTable::max_size  )  const [inline]
 

Returns the maximum possible size for the page table.

This function is supplied for compatibility with the C++ standard library.

Here is the call graph for this function:

PageFrameTable::size_type PageFrameTable::size  )  const
 

Returns the size of the page frame table in bytes.

The size of the page frame table depends on the number of page frames (which is a function of the amount of addressable memory in the system). It is calculated by adding the number of frames times the size of a frame entry to the base size of the table.

Returns:
The number of bytes allocated to the page frame table.


Friends And Related Function Documentation

friend class PageFrameTableIterator [friend]
 


The documentation for this class was generated from the following files:
Generated on Fri Sep 2 10:45:10 2005 for zygoma by doxygen 1.4.2