gem5
v21.1.0.2
|
Class for handling allocation of physical pages in SE mode. More...
#include <mem_pool.hh>
Public Member Functions | |
MemPool (System *system, Addr ptr, Addr limit) | |
Counter | freePage () const |
void | setFreePage (Counter value) |
Addr | freePageAddr () const |
Counter | totalPages () const |
Counter | allocatedPages () const |
Counter | freePages () const |
Addr | allocatedBytes () const |
Addr | freeBytes () const |
Addr | totalBytes () const |
Addr | allocate (Addr npages) |
Private Attributes | |
System * | sys |
Counter | freePageNum |
Page number to free memory. More... | |
Counter | _totalPages |
The size of the pool, in number of pages. More... | |
Class for handling allocation of physical pages in SE mode.
Definition at line 45 of file mem_pool.hh.
Definition at line 41 of file mem_pool.cc.
Definition at line 102 of file mem_pool.cc.
References gem5::AddrRange::end(), fatal_if, freePageAddr(), freePageNum, freePages(), gem5::System::getPageShift(), gem5::System::m5opRange(), gem5::AddrRange::start(), sys, gem5::AddrRange::valid(), and warn.
Addr gem5::MemPool::allocatedBytes | ( | ) | const |
Definition at line 84 of file mem_pool.cc.
References allocatedPages(), gem5::System::getPageShift(), and sys.
Counter gem5::MemPool::allocatedPages | ( | ) | const |
Addr gem5::MemPool::freeBytes | ( | ) | const |
Definition at line 90 of file mem_pool.cc.
References freePages(), gem5::System::getPageShift(), and sys.
Counter gem5::MemPool::freePage | ( | ) | const |
Definition at line 48 of file mem_pool.cc.
References freePageNum.
Addr gem5::MemPool::freePageAddr | ( | ) | const |
Definition at line 60 of file mem_pool.cc.
References freePageNum, gem5::System::getPageShift(), and sys.
Referenced by allocate().
Counter gem5::MemPool::freePages | ( | ) | const |
Definition at line 78 of file mem_pool.cc.
References _totalPages, and freePageNum.
Referenced by allocate(), and freeBytes().
void gem5::MemPool::setFreePage | ( | Counter | value | ) |
Definition at line 54 of file mem_pool.cc.
References freePageNum.
Addr gem5::MemPool::totalBytes | ( | ) | const |
Definition at line 96 of file mem_pool.cc.
References gem5::System::getPageShift(), sys, and totalPages().
Counter gem5::MemPool::totalPages | ( | ) | const |
|
private |
The size of the pool, in number of pages.
Definition at line 54 of file mem_pool.hh.
Referenced by freePages(), and totalPages().
|
private |
Page number to free memory.
Definition at line 51 of file mem_pool.hh.
Referenced by allocate(), allocatedPages(), freePage(), freePageAddr(), freePages(), and setFreePage().
|
private |
Definition at line 48 of file mem_pool.hh.
Referenced by allocate(), allocatedBytes(), freeBytes(), freePageAddr(), and totalBytes().