The Pedigree Project  0.1
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
HostedPhysicalMemoryManager::PageStack Class Reference

The Stack of pages (below4GB, below64GB, no constraint). More...

+ Collaboration diagram for HostedPhysicalMemoryManager::PageStack:

Public Member Functions

 PageStack () INITIALISATION_ONLY
 
physical_uintptr_t allocate (size_t constraints)
 
void free (uint64_t physicalAddress)
 
 ~PageStack ()
 
size_t freePages () const
 

Private Member Functions

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

Private Attributes

void * m_Stack [StackCount]
 
size_t m_StackMax [StackCount]
 
size_t m_StackSize [StackCount]
 
size_t m_FreePages
 

Static Private Attributes

static const size_t StackCount = 1
 

Detailed Description

The Stack of pages (below4GB, below64GB, no constraint).

The actual page stack contains is a Stack of the pages with the constraints below4GB and below64GB and those pages without address size constraints.

Definition at line 106 of file kernel/core/processor/hosted/PhysicalMemoryManager.h.

Constructor & Destructor Documentation

HostedPhysicalMemoryManager::PageStack::PageStack ( )

Default constructor does nothing

Definition at line 493 of file hosted/PhysicalMemoryManager.cc.

Referenced by ~PageStack().

+ Here is the caller graph for this function:

HostedPhysicalMemoryManager::PageStack::~PageStack ( )
inline

The destructor does nothing

Definition at line 119 of file kernel/core/processor/hosted/PhysicalMemoryManager.h.

References m_FreePages, operator=(), and PageStack().

HostedPhysicalMemoryManager::PageStack::PageStack ( const PageStack )
private

The copy-constructor

Note
Not implemented

Member Function Documentation

physical_uintptr_t HostedPhysicalMemoryManager::PageStack::allocate ( size_t  constraints)

Allocate a page with certain constraints

Parameters
[in]constraintseither below4GB or below64GB or 0
Returns
The physical address of the allocated page or 0
Note
Testing.

Definition at line 425 of file hosted/PhysicalMemoryManager.cc.

void HostedPhysicalMemoryManager::PageStack::free ( uint64_t  physicalAddress)

Free a physical page

Parameters
[in]physicalAddressphysical address of the page
Note
Testing.

Definition at line 460 of file hosted/PhysicalMemoryManager.cc.

References VirtualAddressSpace::getKernelAddressSpace(), PhysicalMemoryManager::getPageSize(), physicalAddress(), and VirtualAddressSpace::Write.

Referenced by HostedPhysicalMemoryManager::unmapRegion().

+ Here is the caller graph for this function:

PageStack& HostedPhysicalMemoryManager::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

size_t HostedPhysicalMemoryManager::PageStack::m_FreePages
private

Current pages available.

Definition at line 147 of file kernel/core/processor/hosted/PhysicalMemoryManager.h.

Referenced by ~PageStack().

void* HostedPhysicalMemoryManager::PageStack::m_Stack[StackCount]
private

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

Definition at line 141 of file kernel/core/processor/hosted/PhysicalMemoryManager.h.

size_t HostedPhysicalMemoryManager::PageStack::m_StackMax[StackCount]
private

Size of the currently mapped stack

Definition at line 143 of file kernel/core/processor/hosted/PhysicalMemoryManager.h.

size_t HostedPhysicalMemoryManager::PageStack::m_StackSize[StackCount]
private

Currently used size of the stack

Definition at line 145 of file kernel/core/processor/hosted/PhysicalMemoryManager.h.

const size_t HostedPhysicalMemoryManager::PageStack::StackCount = 1
staticprivate

The number of Stacks

Definition at line 137 of file kernel/core/processor/hosted/PhysicalMemoryManager.h.


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