|
gem5
v21.2.1.1
|
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 | freePage () const |
| void | setFreePage (Counter value) |
| Addr | freePageAddr () 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 | serialize (CheckpointOut &cp) const override |
| Serialize an object. More... | |
| void | unserialize (CheckpointIn &cp) override |
| Unserialize an object. More... | |
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. More... | |
| void | serializeSection (CheckpointOut &cp, const std::string &name) const |
| void | unserializeSection (CheckpointIn &cp, const char *name) |
| Unserialize an a child object. More... | |
| void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Private Member Functions | |
| MemPool () | |
Private Attributes | |
| Addr | pageShift = 0 |
| Counter | startPageNum = 0 |
| Start page of pool. More... | |
| Counter | freePageNum = 0 |
| Page number of free memory. More... | |
| Counter | _totalPages = 0 |
| The size of the pool, in number of pages. More... | |
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. More... | |
| static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
| Generate a checkpoint file so that the serialization can be routed to it. More... | |
Class for handling allocation of physical pages in SE mode.
Definition at line 45 of file mem_pool.hh.
|
inlineprivate |
Definition at line 59 of file mem_pool.hh.
Definition at line 40 of file mem_pool.cc.
References _totalPages, and gem5_assert.
Definition at line 115 of file mem_pool.cc.
References fatal_if, freePageAddr(), freePageNum, and freePages().
| Addr gem5::MemPool::allocatedBytes | ( | ) | const |
Definition at line 97 of file mem_pool.cc.
References allocatedPages(), and pageShift.
| Counter gem5::MemPool::allocatedPages | ( | ) | const |
Definition at line 79 of file mem_pool.cc.
References freePageNum, and startPageNum.
Referenced by allocatedBytes(), and freePages().
| Addr gem5::MemPool::freeBytes | ( | ) | const |
Definition at line 103 of file mem_pool.cc.
References freePages(), and pageShift.
| Counter gem5::MemPool::freePage | ( | ) | const |
Definition at line 55 of file mem_pool.cc.
References freePageNum.
| Addr gem5::MemPool::freePageAddr | ( | ) | const |
Definition at line 67 of file mem_pool.cc.
References freePageNum, and pageShift.
Referenced by allocate().
| Counter gem5::MemPool::freePages | ( | ) | const |
Definition at line 85 of file mem_pool.cc.
References _totalPages, and allocatedPages().
Referenced by allocate(), 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 127 of file mem_pool.cc.
References _totalPages, freePageNum, pageShift, gem5::paramOut(), and startPageNum.
| void gem5::MemPool::setFreePage | ( | Counter | value | ) |
Definition at line 61 of file mem_pool.cc.
References freePageNum.
| Addr gem5::MemPool::startAddr | ( | ) | const |
Definition at line 91 of file mem_pool.cc.
References pageShift, and startPage().
| Counter gem5::MemPool::startPage | ( | ) | const |
| Addr gem5::MemPool::totalBytes | ( | ) | const |
Definition at line 109 of file mem_pool.cc.
References pageShift, and totalPages().
| Counter gem5::MemPool::totalPages | ( | ) | const |
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 136 of file mem_pool.cc.
References _totalPages, freePageNum, pageShift, gem5::paramIn(), and startPageNum.
|
friend |
Definition at line 61 of file mem_pool.hh.
|
private |
The size of the pool, in number of pages.
Definition at line 57 of file mem_pool.hh.
Referenced by freePages(), MemPool(), serialize(), totalPages(), and unserialize().
|
private |
Page number of free memory.
Definition at line 54 of file mem_pool.hh.
Referenced by allocate(), allocatedPages(), freePage(), freePageAddr(), serialize(), setFreePage(), and unserialize().
|
private |
Definition at line 48 of file mem_pool.hh.
Referenced by allocatedBytes(), freeBytes(), freePageAddr(), serialize(), startAddr(), totalBytes(), and unserialize().
|
private |
Start page of pool.
Definition at line 51 of file mem_pool.hh.
Referenced by allocatedPages(), serialize(), startPage(), and unserialize().