|
gem5 [DEVELOP-FOR-25.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. | |
| void | deallocPhysPages (Addr page_addr, int npages, int pool_id=0) |
| Deallocate 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 84 of file mem_pool.hh.
|
inline |
Definition at line 92 of file mem_pool.hh.
References pageShift.
| Addr gem5::MemPools::allocPhysPages | ( | int | npages, |
| int | pool_id = 0 ) |
Allocate npages contiguous unused physical pages.
Definition at line 163 of file mem_pool.cc.
References pools.
| void gem5::MemPools::deallocPhysPages | ( | Addr | page_addr, |
| int | npages, | ||
| int | pool_id = 0 ) |
Deallocate physical pages.
These may be reallocated by allocPhysPages later on.
Definition at line 169 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 181 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 175 of file mem_pool.cc.
References pools.
| void gem5::MemPools::populate | ( | const AddrRangeList & | memories | ) |
Definition at line 156 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 187 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 198 of file mem_pool.cc.
References gem5::csprintf(), gem5::ArmISA::i, pools, UNSERIALIZE_SCALAR, and gem5::Serializable::unserializeSection().
|
private |
Definition at line 87 of file mem_pool.hh.
Referenced by MemPools(), and populate().
|
private |
Definition at line 89 of file mem_pool.hh.
Referenced by allocPhysPages(), deallocPhysPages(), freeMemSize(), memSize(), populate(), serialize(), and unserialize().