FreeNOS
MemoryMap.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Niek Linnenbank
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include "MemoryMap.h"
19 
21 {
22 }
23 
25 {
34 }
35 
37 {
38  return m_regions[region];
39 }
40 
42 {
43  m_regions[region] = range;
44 }
Memory::Range
Memory range.
Definition: Memory.h:55
MemoryMap::UserStack
@ UserStack
< User stack
Definition: MemoryMap.h:58
MemoryMap::UserShare
@ UserShare
< User shared dynamic memory mappings
Definition: MemoryMap.h:60
MemoryMap::UserData
@ UserData
< User program data from libexec, e.g.
Definition: MemoryMap.h:56
MemoryMap::range
Memory::Range range(Region region) const
Get memory range for the given region.
Definition: MemoryMap.cpp:36
MemoryMap
Describes virtual memory map layout.
Definition: MemoryMap.h:38
MemoryMap.h
MemoryMap::UserPrivate
@ UserPrivate
< User private dynamic memory mappings
Definition: MemoryMap.h:59
MemoryMap::Region
Region
Memory regions.
Definition: MemoryMap.h:52
MemoryMap::KernelPrivate
@ KernelPrivate
< Kernel dynamic memory mappings
Definition: MemoryMap.h:55
MemoryMap::UserArgs
@ UserArgs
< Used for copying program arguments and file descriptors
Definition: MemoryMap.h:61
MemoryMap::setRange
void setRange(Region region, Memory::Range range)
Set memory range for the given region.
Definition: MemoryMap.cpp:41
MemoryMap::UserHeap
@ UserHeap
< User heap
Definition: MemoryMap.h:57
MemoryMap::MemoryMap
MemoryMap()
Constructor.
Definition: MemoryMap.cpp:20
MemoryMap::KernelData
@ KernelData
< Kernel program data from libexec, e.g.
Definition: MemoryMap.h:54
MemoryMap::m_regions
Memory::Range m_regions[MEMORYMAP_MAX_REGIONS]
Memory ranges.
Definition: MemoryMap.h:95