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
23
35
37{
38 return m_regions[region];
39}
40
42{
43 m_regions[region] = range;
44}
Describes virtual memory map layout.
Definition MemoryMap.h:39
Region
Memory regions.
Definition MemoryMap.h:53
@ UserData
< User program data from libexec, e.g.
Definition MemoryMap.h:56
@ UserArgs
< Used for copying program arguments and file descriptors
Definition MemoryMap.h:61
@ UserStack
< User stack
Definition MemoryMap.h:58
@ UserShare
< User shared dynamic memory mappings
Definition MemoryMap.h:60
@ UserPrivate
< User private dynamic memory mappings
Definition MemoryMap.h:59
@ UserHeap
< User heap
Definition MemoryMap.h:57
@ KernelPrivate
< Kernel dynamic memory mappings
Definition MemoryMap.h:55
@ KernelData
< Kernel program data from libexec, e.g.
Definition MemoryMap.h:54
MemoryMap()
Constructor.
Definition MemoryMap.cpp:20
Memory::Range m_regions[MEMORYMAP_MAX_REGIONS]
Memory ranges.
Definition MemoryMap.h:95
Memory::Range range(Region region) const
Get memory range for the given region.
Definition MemoryMap.cpp:36
void setRange(Region region, Memory::Range range)
Set memory range for the given region.
Definition MemoryMap.cpp:41
Memory range.
Definition Memory.h:56