HPCToolkit
|
#include <LRUList.hpp>
Public Member Functions | |
LRUList (int expectedMaxSize) | |
int | addNew (T *toAdd) |
int | addNewUnused (T *toAdd) |
void | putOnTop (int index) |
T * | getLast () |
void | removeLast () |
void | reAdd (int index) |
int | getTotalPageCount () |
int | getUsedPageCount () |
virtual | ~LRUList () |
Private Attributes | |
int | totalPages |
int | usedPages |
int | currentFront |
list< T * > | useOrder |
list< T * > | removed |
vector< typename list< T * >::iterator > | iters |
Definition at line 75 of file LRUList.hpp.
|
inline |
It's a special data structure that uses a little extra memory in exchange for all operations running in constant time. Objects are added to the data structure and given an index that identifies them. Once added, objects are not deleted; they are either on the "in use" list, which for VersatileMemoryPage corresponds to being mapped, or they are on the "not in use" list, which corresponds to not being mapped. An object must only be added with addNew() once. If it is removed from the list with remove(), it must be added with reAdd(). It is not necessary to call putOnTop() after adding an element as it will already be on top.
Definition at line 95 of file LRUList.hpp.
|
inlinevirtual |
Definition at line 151 of file LRUList.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 79 of file LRUList.hpp.
|
private |
Definition at line 82 of file LRUList.hpp.
|
private |
Definition at line 81 of file LRUList.hpp.
|
private |
Definition at line 77 of file LRUList.hpp.
|
private |
Definition at line 78 of file LRUList.hpp.
|
private |
Definition at line 80 of file LRUList.hpp.