gem5  v21.1.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
gem5::MemPool Class Reference

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

Systemsys
 
Counter freePageNum
 Page number to free memory. More...
 
Counter _totalPages
 The size of the pool, in number of pages. More...
 

Detailed Description

Class for handling allocation of physical pages in SE mode.

Definition at line 45 of file mem_pool.hh.

Constructor & Destructor Documentation

◆ MemPool()

gem5::MemPool::MemPool ( System system,
Addr  ptr,
Addr  limit 
)

Definition at line 41 of file mem_pool.cc.

Member Function Documentation

◆ allocate()

Addr gem5::MemPool::allocate ( Addr  npages)

◆ allocatedBytes()

Addr gem5::MemPool::allocatedBytes ( ) const

Definition at line 84 of file mem_pool.cc.

References allocatedPages(), gem5::System::getPageShift(), and sys.

◆ allocatedPages()

Counter gem5::MemPool::allocatedPages ( ) const

Definition at line 72 of file mem_pool.cc.

References freePageNum.

Referenced by allocatedBytes().

◆ freeBytes()

Addr gem5::MemPool::freeBytes ( ) const

Definition at line 90 of file mem_pool.cc.

References freePages(), gem5::System::getPageShift(), and sys.

◆ freePage()

Counter gem5::MemPool::freePage ( ) const

Definition at line 48 of file mem_pool.cc.

References freePageNum.

◆ freePageAddr()

Addr gem5::MemPool::freePageAddr ( ) const

Definition at line 60 of file mem_pool.cc.

References freePageNum, gem5::System::getPageShift(), and sys.

Referenced by allocate().

◆ freePages()

Counter gem5::MemPool::freePages ( ) const

Definition at line 78 of file mem_pool.cc.

References _totalPages, and freePageNum.

Referenced by allocate(), and freeBytes().

◆ setFreePage()

void gem5::MemPool::setFreePage ( Counter  value)

Definition at line 54 of file mem_pool.cc.

References freePageNum.

◆ totalBytes()

Addr gem5::MemPool::totalBytes ( ) const

Definition at line 96 of file mem_pool.cc.

References gem5::System::getPageShift(), sys, and totalPages().

◆ totalPages()

Counter gem5::MemPool::totalPages ( ) const

Definition at line 66 of file mem_pool.cc.

References _totalPages.

Referenced by totalBytes().

Member Data Documentation

◆ _totalPages

Counter gem5::MemPool::_totalPages
private

The size of the pool, in number of pages.

Definition at line 54 of file mem_pool.hh.

Referenced by freePages(), and totalPages().

◆ freePageNum

Counter gem5::MemPool::freePageNum
private

Page number to free memory.

Definition at line 51 of file mem_pool.hh.

Referenced by allocate(), allocatedPages(), freePage(), freePageAddr(), freePages(), and setFreePage().

◆ sys

System* gem5::MemPool::sys
private

Definition at line 48 of file mem_pool.hh.

Referenced by allocate(), allocatedBytes(), freeBytes(), freePageAddr(), and totalBytes().


The documentation for this class was generated from the following files:

Generated on Tue Sep 21 2021 12:27:46 for gem5 by doxygen 1.8.17