gem5 v24.0.0.0
|
#include <mem_pool.hh>
Public Member Functions | |
MemPools (Addr page_shift) | |
void | populate (const AddrRangeList &memories) |
Addr | allocPhysPages (int npages, int pool_id=0) |
Allocate npages contiguous unused physical pages. | |
Addr | memSize (int pool_id=0) const |
Amount of physical memory that exists in a pool. | |
Addr | freeMemSize (int pool_id=0) const |
Amount of physical memory that is still free in a pool. | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Private Attributes | |
Addr | pageShift |
std::vector< MemPool > | pools |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Definition at line 86 of file mem_pool.hh.
|
inline |
Definition at line 94 of file mem_pool.hh.
Addr gem5::MemPools::allocPhysPages | ( | int | npages, |
int | pool_id = 0 ) |
Allocate npages contiguous unused physical pages.
Definition at line 152 of file mem_pool.cc.
References pools.
Addr gem5::MemPools::freeMemSize | ( | int | pool_id = 0 | ) | const |
Amount of physical memory that is still free in a pool.
Definition at line 164 of file mem_pool.cc.
References pools.
Addr gem5::MemPools::memSize | ( | int | pool_id = 0 | ) | const |
Amount of physical memory that exists in a pool.
Definition at line 158 of file mem_pool.cc.
References pools.
void gem5::MemPools::populate | ( | const AddrRangeList & | memories | ) |
Definition at line 145 of file mem_pool.cc.
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 170 of file mem_pool.cc.
References gem5::csprintf(), gem5::ArmISA::i, pools, SERIALIZE_SCALAR, and gem5::Serializable::serializeSection().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 181 of file mem_pool.cc.
References gem5::csprintf(), gem5::ArmISA::i, pools, UNSERIALIZE_SCALAR, and gem5::Serializable::unserializeSection().
|
private |
Definition at line 89 of file mem_pool.hh.
Referenced by populate().
|
private |
Definition at line 91 of file mem_pool.hh.
Referenced by allocPhysPages(), freeMemSize(), memSize(), populate(), serialize(), and unserialize().