FreeNOS
|
Describes virtual memory map layout. More...
#include <MemoryMap.h>
Public Types | |
enum | Region { KernelData, KernelPrivate, UserData, UserHeap, UserStack, UserPrivate, UserShare, UserArgs } |
Memory regions. More... | |
typedef enum MemoryMap::Region | Region |
Memory regions. More... | |
Public Member Functions | |
MemoryMap () | |
Constructor. More... | |
MemoryMap (const MemoryMap &map) | |
Copy Constructor. More... | |
Memory::Range | range (Region region) const |
Get memory range for the given region. More... | |
void | setRange (Region region, Memory::Range range) |
Set memory range for the given region. More... | |
Protected Attributes | |
Memory::Range | m_regions [MEMORYMAP_MAX_REGIONS] |
Memory ranges. More... | |
Describes virtual memory map layout.
Definition at line 38 of file MemoryMap.h.
typedef enum MemoryMap::Region MemoryMap::Region |
enum MemoryMap::Region |
Memory regions.
Various memory regions which are available on the system. Memory regions are labels which refer to predefined virtual memory ranges. The virtual memory address range of each region depends on the architecture implementation and can be obtained with region().
Enumerator | |
---|---|
KernelData | < Kernel program data from libexec, e.g. code, bss, (ro)data |
KernelPrivate | < Kernel dynamic memory mappings |
UserData | < User program data from libexec, e.g. code, bss, (ro)data |
UserHeap | < User heap |
UserStack | < User stack |
UserPrivate | < User private dynamic memory mappings |
UserShare | < User shared dynamic memory mappings |
UserArgs | < Used for copying program arguments and file descriptors |
Definition at line 52 of file MemoryMap.h.
MemoryMap::MemoryMap | ( | ) |
Constructor.
Definition at line 20 of file MemoryMap.cpp.
MemoryMap::MemoryMap | ( | const MemoryMap & | map | ) |
Copy Constructor.
Definition at line 24 of file MemoryMap.cpp.
References KernelData, KernelPrivate, m_regions, setRange(), UserArgs, UserData, UserHeap, UserPrivate, UserShare, and UserStack.
Memory::Range MemoryMap::range | ( | MemoryMap::Region | region | ) | const |
Get memory range for the given region.
region | Memory region. |
Definition at line 36 of file MemoryMap.cpp.
References m_regions.
Referenced by PageAllocator::allocate(), RecoveryServer::cleanupProgram(), MemoryContext::findFree(), IntelProcess::initialize(), ARMPaging::initialize(), IntelPaging::initialize(), ARMProcess::initialize(), Kernel::Kernel(), Mount::listMounts(), Kernel::loadBootProgram(), ProcessClient::processInfo(), IntelProcess::reset(), ARMProcess::reset(), RecoveryServer::restartProcess(), SECTION(), setRange(), setupHeap(), setupMappings(), spawn(), and Process::~Process().
void MemoryMap::setRange | ( | Region | region, |
Memory::Range | range | ||
) |
Set memory range for the given region.
region | Identifier of the memory region to set |
range | New memory range value for the memory region |
Definition at line 41 of file MemoryMap.cpp.
References m_regions, and range().
Referenced by MemoryMap().
|
protected |
Memory ranges.
Definition at line 95 of file MemoryMap.h.
Referenced by ARMMap::ARMMap(), IntelMap::IntelMap(), MemoryMap(), range(), and setRange().