gem5
v19.0.0.0
|
This class holds the memory state for the Process class and all of its derived, architecture-specific children. More...
#include <mem_state.hh>
Public Member Functions | |
MemState (Addr brk_point, Addr stack_base, Addr max_stack_size, Addr next_thread_stack_base, Addr mmap_end) | |
MemState & | operator= (const MemState &in) |
Addr | getBrkPoint () const |
Addr | getStackBase () const |
Addr | getStackSize () const |
Addr | getMaxStackSize () const |
Addr | getStackMin () const |
Addr | getNextThreadStackBase () const |
Addr | getMmapEnd () const |
void | setBrkPoint (Addr brk_point) |
void | setStackBase (Addr stack_base) |
void | setStackSize (Addr stack_size) |
void | setMaxStackSize (Addr max_stack) |
void | setStackMin (Addr stack_min) |
void | setNextThreadStackBase (Addr ntsb) |
void | setMmapEnd (Addr mmap_end) |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
![]() | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Private Attributes | |
Addr | _brkPoint |
Addr | _stackBase |
Addr | _stackSize |
Addr | _maxStackSize |
Addr | _stackMin |
Addr | _nextThreadStackBase |
Addr | _mmapEnd |
Additional Inherited Members | |
![]() | |
static const std::string & | currentSection () |
Get the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
static void | unserializeGlobals (CheckpointIn &cp) |
![]() | |
static int | ckptCount = 0 |
static int | ckptMaxCount = 0 |
static int | ckptPrevCount = -1 |
This class holds the memory state for the Process class and all of its derived, architecture-specific children.
The fields held in this class dynamically change as the process object is run in the simulator. They are updated by system calls and faults; each change represents a modification to the process address space. The stack, heap, and mmap boundaries are held with this class along with the base of the next thread stack.
The class is meant to be allocated dynamically and shared through a pointer interface because two process can potentially share their virtual address space if certain options are passed into the clone(2).
Definition at line 50 of file mem_state.hh.
|
inline |
Definition at line 53 of file mem_state.hh.
|
inline |
Definition at line 76 of file mem_state.hh.
References _brkPoint.
|
inline |
Definition at line 79 of file mem_state.hh.
References _maxStackSize.
|
inline |
Definition at line 82 of file mem_state.hh.
References _mmapEnd.
|
inline |
Definition at line 81 of file mem_state.hh.
References _nextThreadStackBase.
|
inline |
Definition at line 77 of file mem_state.hh.
References _stackBase.
|
inline |
Definition at line 80 of file mem_state.hh.
References _stackMin.
|
inline |
Definition at line 78 of file mem_state.hh.
References _stackSize.
Definition at line 61 of file mem_state.hh.
References _brkPoint, _maxStackSize, _mmapEnd, _nextThreadStackBase, _stackBase, _stackMin, and _stackSize.
|
inlineoverridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 93 of file mem_state.hh.
References _brkPoint, _maxStackSize, _mmapEnd, _nextThreadStackBase, _stackBase, _stackMin, _stackSize, and paramOut().
|
inline |
Definition at line 84 of file mem_state.hh.
References _brkPoint.
|
inline |
Definition at line 87 of file mem_state.hh.
References _maxStackSize.
|
inline |
Definition at line 90 of file mem_state.hh.
References _mmapEnd.
|
inline |
Definition at line 89 of file mem_state.hh.
References _nextThreadStackBase.
|
inline |
Definition at line 85 of file mem_state.hh.
References _stackBase.
|
inline |
Definition at line 88 of file mem_state.hh.
References _stackMin.
|
inline |
Definition at line 86 of file mem_state.hh.
References _stackSize.
|
inlineoverridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 104 of file mem_state.hh.
References _brkPoint, _maxStackSize, _mmapEnd, _nextThreadStackBase, _stackBase, _stackMin, _stackSize, and paramIn().
|
private |
Definition at line 116 of file mem_state.hh.
Referenced by getBrkPoint(), operator=(), serialize(), setBrkPoint(), and unserialize().
|
private |
Definition at line 119 of file mem_state.hh.
Referenced by getMaxStackSize(), operator=(), serialize(), setMaxStackSize(), and unserialize().
|
private |
Definition at line 122 of file mem_state.hh.
Referenced by getMmapEnd(), operator=(), serialize(), setMmapEnd(), and unserialize().
|
private |
Definition at line 121 of file mem_state.hh.
Referenced by getNextThreadStackBase(), operator=(), serialize(), setNextThreadStackBase(), and unserialize().
|
private |
Definition at line 117 of file mem_state.hh.
Referenced by getStackBase(), operator=(), serialize(), setStackBase(), and unserialize().
|
private |
Definition at line 120 of file mem_state.hh.
Referenced by getStackMin(), operator=(), serialize(), setStackMin(), and unserialize().
|
private |
Definition at line 118 of file mem_state.hh.
Referenced by getStackSize(), operator=(), serialize(), setStackSize(), and unserialize().