SCM Library
Spherical Cube Map rendering library
|
An scm_set represents an a set of active pages, either currently in a cache or awaiting loading, with associated insertion time. More...
#include <scm-set.hpp>
Public Member Functions | |
scm_page | search (scm_page, int) |
Search for the given page in this page set. If found, update the page entry with the current time t to indicate recent use. | |
void | insert (scm_page, int) |
Add a page to this set, associated with the current time. | |
void | remove (scm_page) |
Remove a page from this set. | |
scm_page | eject (int, long long) |
Eject a page from this set to accommodate the addition of a new page. More... | |
bool | empty () const |
Return true if the set is empty. | |
An scm_set represents an a set of active pages, either currently in a cache or awaiting loading, with associated insertion time.
scm_page scm_set::eject | ( | int | t, |
long long | i | ||
) |
Eject a page from this set to accommodate the addition of a new page.
The general polity is LRU, but with considerations for time and priority that help mitigate thrashing.
t | Current time |
i | Page index |