Go to the documentation of this file.
29 #ifndef SRC_SIM_MEM_STATE_HH
30 #define SRC_SIM_MEM_STATE_HH
37 #include "config/the_isa.hh"
38 #include "debug/Vma.hh"
66 Addr max_stack_size,
Addr next_thread_stack_base,
126 const std::string&
name=
"anon",
int sim_fd=-1,
Process * _ownerProcess
Owner process of MemState.
std::string printVmaList()
Print the list of VMAs in a format similar to /proc/self/maps.
void setMmapEnd(Addr mmap_end)
MemState(Process *owner, Addr brk_point, Addr stack_base, Addr max_stack_size, Addr next_thread_stack_base, Addr mmap_end)
This class holds the memory state for the Process class and all of its derived, architecture-specific...
bool isUnmapped(Addr start_addr, Addr length)
Check if any page in the virtual address range from start_addr to start_addr + length is already mapp...
void resetOwner(Process *owner)
Change the Process owner in case this MemState is copied.
void remapRegion(Addr start_addr, Addr new_start_addr, Addr length)
Remap a pre-existing region.
MemState & operator=(const MemState &in)
Basic support for object serialization.
void paramOut(CheckpointOut &cp, const string &name, ExtMachInst const &machInst)
Addr getStackBase() const
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
void setStackMin(Addr stack_min)
Addr extendMmap(Addr length)
void setNextThreadStackBase(Addr ntsb)
Addr getStackSize() const
std::list< VMA > _vmaList
The _vmaList member is a list of virtual memory areas in the target application space that have been ...
void mapRegion(Addr start_addr, Addr length, const std::string &name="anon", int sim_fd=-1, Addr offset=0)
Add a new memory region.
Addr getBrkPoint() const
Get/set base addresses and sizes for the stack and data segments of the process' memory.
Addr _endBrkPoint
Keeps record of the furthest mapped heap location.
bool fixupFault(Addr vaddr)
Attempt to fix up a fault at vaddr by allocating a page.
void setStackBase(Addr stack_base)
void setBrkPoint(Addr brk_point)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string & name()
Addr getNextThreadStackBase() const
void serialize(CheckpointOut &cp) const override
Serialize an object.
void setMaxStackSize(Addr max_stack)
Addr _nextThreadStackBase
void allocateMem(Addr vaddr, int64_t size, bool clobber=false)
Given the vaddr and size, this method will chunk the allocation into page granularity and then reques...
void paramIn(CheckpointIn &cp, const string &name, ExtMachInst &machInst)
Addr getMaxStackSize() const
std::ostream CheckpointOut
void unmapRegion(Addr start_addr, Addr length)
Unmap a pre-existing region.
void setStackSize(Addr stack_size)
std::string csprintf(const char *format, const Args &...args)
void updateBrkRegion(Addr old_brk, Addr new_brk)
Change the end of a process' program break.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17