The Pedigree Project  0.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PpcCommonPhysicalMemoryManager::PageStack Class Reference
+ Collaboration diagram for PpcCommonPhysicalMemoryManager::PageStack:

Public Member Functions

 PageStack () INITIALISATION_ONLY
 
physical_uintptr_t allocate ()
 
void free (uintptr_t physicalAddress)
 
 ~PageStack ()
 

Private Member Functions

 PageStack (const PageStack &)
 
PageStackoperator= (const PageStack &)
 

Private Attributes

physical_uintptr_t * m_Stack
 
size_t m_StackMax
 
size_t m_StackSize
 

Detailed Description

The stack of available pages.

Definition at line 81 of file kernel/core/processor/ppc_common/PhysicalMemoryManager.h.

Constructor & Destructor Documentation

PpcCommonPhysicalMemoryManager::PageStack::PageStack ( )

Default constructor does nothing

Definition at line 226 of file ppc_common/PhysicalMemoryManager.cc.

Referenced by ~PageStack().

+ Here is the caller graph for this function:

PpcCommonPhysicalMemoryManager::PageStack::~PageStack ( )
inline

The destructor does nothing

Definition at line 93 of file kernel/core/processor/ppc_common/PhysicalMemoryManager.h.

References operator=(), and PageStack().

PpcCommonPhysicalMemoryManager::PageStack::PageStack ( const PageStack )
private

The copy-constructor

Note
Not implemented

Member Function Documentation

physical_uintptr_t PpcCommonPhysicalMemoryManager::PageStack::allocate ( )

Allocate a page with certain constraints

Returns
The physical address of the allocated page or 0
Todo:
Swapspace here.

Definition at line 231 of file ppc_common/PhysicalMemoryManager.cc.

References m_Stack, m_StackSize, and panic().

void PpcCommonPhysicalMemoryManager::PageStack::free ( uintptr_t  physicalAddress)

Free a physical page

Parameters
[in]physicalAddressphysical address of the page

Definition at line 238 of file ppc_common/PhysicalMemoryManager.cc.

References m_Stack, m_StackMax, m_StackSize, and physicalAddress().

Referenced by PpcCommonPhysicalMemoryManager::~PpcCommonPhysicalMemoryManager().

+ Here is the caller graph for this function:

PageStack& PpcCommonPhysicalMemoryManager::PageStack::operator= ( const PageStack )
private

The copy-constructor

Note
Not implemented

Referenced by ~PageStack().

+ Here is the caller graph for this function:

Member Data Documentation

physical_uintptr_t* PpcCommonPhysicalMemoryManager::PageStack::m_Stack
private

Pointer to the base address of the stack. The stack grows upwards.

Definition at line 107 of file kernel/core/processor/ppc_common/PhysicalMemoryManager.h.

Referenced by allocate(), and free().

size_t PpcCommonPhysicalMemoryManager::PageStack::m_StackMax
private

Size of the currently mapped stack

Definition at line 109 of file kernel/core/processor/ppc_common/PhysicalMemoryManager.h.

Referenced by free().

size_t PpcCommonPhysicalMemoryManager::PageStack::m_StackSize
private

Currently used size of the stack

Definition at line 111 of file kernel/core/processor/ppc_common/PhysicalMemoryManager.h.

Referenced by allocate(), and free().


The documentation for this class was generated from the following files: