|
gem5 [DEVELOP-FOR-25.0]
|
Class for handling allocation of physical pages in SE mode. More...
#include <mem_pool.hh>
Public Member Functions | |
| MemPool (Addr page_shift, Addr ptr, Addr limit) | |
| Counter | startPage () const |
| Counter | totalPages () const |
| Counter | allocatedPages () const |
| Counter | freePages () const |
| Addr | startAddr () const |
| Addr | allocatedBytes () const |
| Addr | freeBytes () const |
| Addr | totalBytes () const |
| Addr | allocate (Addr npages) |
| void | deallocate (Addr start, Addr npages) |
| 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 Member Functions | |
| MemPool ()=default | |
Private Attributes | |
| Addr | pageShift = 0 |
| Counter | startPageNum = 0 |
| Start page of pool. | |
| Counter | _totalPages = 0 |
| The size of the pool, in number of pages. | |
| FreeList< Addr > | freePhysPages |
Friends | |
| class | MemPools |
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. | |
Class for handling allocation of physical pages in SE mode.
Definition at line 46 of file mem_pool.hh.
|
privatedefault |
Definition at line 40 of file mem_pool.cc.
References _totalPages, freePhysPages, gem5::X86ISA::limit, pageShift, and startPageNum.
Definition at line 96 of file mem_pool.cc.
References fatal, freePhysPages, and pageShift.
| Addr gem5::MemPool::allocatedBytes | ( | ) | const |
Definition at line 78 of file mem_pool.cc.
References allocatedPages(), and pageShift.
| Counter gem5::MemPool::allocatedPages | ( | ) | const |
Definition at line 60 of file mem_pool.cc.
References freePages(), and totalPages().
Referenced by allocatedBytes().
Definition at line 105 of file mem_pool.cc.
References freePhysPages, and pageShift.
| Addr gem5::MemPool::freeBytes | ( | ) | const |
Definition at line 84 of file mem_pool.cc.
References freePages(), and pageShift.
| Counter gem5::MemPool::freePages | ( | ) | const |
Definition at line 66 of file mem_pool.cc.
References freePhysPages.
Referenced by allocatedPages(), and freeBytes().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 111 of file mem_pool.cc.
References _totalPages, gem5::csprintf(), freePhysPages, gem5::ArmISA::i, pageShift, gem5::paramOut(), and startPageNum.
| Addr gem5::MemPool::startAddr | ( | ) | const |
Definition at line 72 of file mem_pool.cc.
References pageShift, and startPage().
| Counter gem5::MemPool::startPage | ( | ) | const |
| Addr gem5::MemPool::totalBytes | ( | ) | const |
Definition at line 90 of file mem_pool.cc.
References pageShift, and totalPages().
| Counter gem5::MemPool::totalPages | ( | ) | const |
Definition at line 54 of file mem_pool.cc.
References _totalPages.
Referenced by allocatedPages(), and totalBytes().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 128 of file mem_pool.cc.
References _totalPages, gem5::RiscvISA::base, gem5::csprintf(), freePhysPages, gem5::ArmISA::i, gem5::ArmISA::n, gem5::optParamIn(), pageShift, gem5::paramIn(), startPageNum, and warn.
|
friend |
Definition at line 61 of file mem_pool.hh.
References gem5::X86ISA::limit, and MemPools.
Referenced by MemPools.
|
private |
The size of the pool, in number of pages.
Definition at line 55 of file mem_pool.hh.
Referenced by MemPool(), serialize(), totalPages(), and unserialize().
Definition at line 57 of file mem_pool.hh.
Referenced by allocate(), deallocate(), freePages(), MemPool(), serialize(), and unserialize().
|
private |
Definition at line 49 of file mem_pool.hh.
Referenced by allocate(), allocatedBytes(), deallocate(), freeBytes(), MemPool(), serialize(), startAddr(), totalBytes(), and unserialize().
|
private |
Start page of pool.
Definition at line 52 of file mem_pool.hh.
Referenced by MemPool(), serialize(), startPage(), and unserialize().