gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
MemState Class Reference

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)
 
MemStateoperator= (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)
 

Private Attributes

Addr _brkPoint
 
Addr _stackBase
 
Addr _stackSize
 
Addr _maxStackSize
 
Addr _stackMin
 
Addr _nextThreadStackBase
 
Addr _mmapEnd
 

Detailed Description

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 48 of file mem_state.hh.

Constructor & Destructor Documentation

MemState::MemState ( Addr  brk_point,
Addr  stack_base,
Addr  max_stack_size,
Addr  next_thread_stack_base,
Addr  mmap_end 
)
inline

Definition at line 51 of file mem_state.hh.

Member Function Documentation

Addr MemState::getBrkPoint ( ) const
inline

Definition at line 74 of file mem_state.hh.

References _brkPoint.

Addr MemState::getMaxStackSize ( ) const
inline

Definition at line 77 of file mem_state.hh.

References _maxStackSize.

Addr MemState::getMmapEnd ( ) const
inline

Definition at line 80 of file mem_state.hh.

References _mmapEnd.

Addr MemState::getNextThreadStackBase ( ) const
inline

Definition at line 79 of file mem_state.hh.

References _nextThreadStackBase.

Addr MemState::getStackBase ( ) const
inline

Definition at line 75 of file mem_state.hh.

References _stackBase.

Addr MemState::getStackMin ( ) const
inline

Definition at line 78 of file mem_state.hh.

References _stackMin.

Addr MemState::getStackSize ( ) const
inline

Definition at line 76 of file mem_state.hh.

References _stackSize.

MemState& MemState::operator= ( const MemState in)
inline
void MemState::setBrkPoint ( Addr  brk_point)
inline

Definition at line 82 of file mem_state.hh.

References _brkPoint.

void MemState::setMaxStackSize ( Addr  max_stack)
inline

Definition at line 85 of file mem_state.hh.

References _maxStackSize.

void MemState::setMmapEnd ( Addr  mmap_end)
inline

Definition at line 88 of file mem_state.hh.

References _mmapEnd.

void MemState::setNextThreadStackBase ( Addr  ntsb)
inline

Definition at line 87 of file mem_state.hh.

References _nextThreadStackBase.

void MemState::setStackBase ( Addr  stack_base)
inline

Definition at line 83 of file mem_state.hh.

References _stackBase.

void MemState::setStackMin ( Addr  stack_min)
inline

Definition at line 86 of file mem_state.hh.

References _stackMin.

void MemState::setStackSize ( Addr  stack_size)
inline

Definition at line 84 of file mem_state.hh.

References _stackSize.

Member Data Documentation

Addr MemState::_brkPoint
private

Definition at line 91 of file mem_state.hh.

Referenced by getBrkPoint(), operator=(), and setBrkPoint().

Addr MemState::_maxStackSize
private

Definition at line 94 of file mem_state.hh.

Referenced by getMaxStackSize(), operator=(), and setMaxStackSize().

Addr MemState::_mmapEnd
private

Definition at line 97 of file mem_state.hh.

Referenced by getMmapEnd(), operator=(), and setMmapEnd().

Addr MemState::_nextThreadStackBase
private

Definition at line 96 of file mem_state.hh.

Referenced by getNextThreadStackBase(), operator=(), and setNextThreadStackBase().

Addr MemState::_stackBase
private

Definition at line 92 of file mem_state.hh.

Referenced by getStackBase(), operator=(), and setStackBase().

Addr MemState::_stackMin
private

Definition at line 95 of file mem_state.hh.

Referenced by getStackMin(), operator=(), and setStackMin().

Addr MemState::_stackSize
private

Definition at line 93 of file mem_state.hh.

Referenced by getStackSize(), operator=(), and setStackSize().


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

Generated on Fri Jun 9 2017 13:04:14 for gem5 by doxygen 1.8.6