82 vector<typename list<T*>::iterator>
iters;
97 iters.reserve(expectedMaxSize);
104 useOrder.push_front(toAdd);
105 int index = totalPages++;
106 currentFront = index;
107 iters.push_back(useOrder.begin());
113 removed.push_front(toAdd);
114 int index = totalPages++;
115 iters.push_back(removed.begin());
120 if (index == currentFront)
return;
121 typename list<T*>::iterator it;
123 useOrder.splice(useOrder.begin(),
useOrder, it);
124 currentFront = index;
128 return useOrder.back();
133 removed.splice(removed.end(),
useOrder, --useOrder.end());
138 typename list<T*>::iterator it = iters[index];
139 useOrder.splice(useOrder.begin(),
removed, it);
140 currentFront = index;
LRUList(int expectedMaxSize)
vector< typename list< T * >::iterator > iters
int addNewUnused(T *toAdd)
void(* T)(int code, va_list_box *box, int put(int c, void *cl), void *cl, unsigned char flags[256], int width, int precision)