Fennel: TwoQPageQueue Class Reference (original) (raw)

Removes a page from the queue.

Parameters:

page the page being removed

Definition at line 163 of file TwoQVictimPolicy.h.

References IntrusiveDListNode::detach(), IntrusiveDListNode::getNext(), and IntrusiveDListNode::getPrev().

Referenced by TwoQVictimPolicy< PageT >::notifyPageClean(), TwoQVictimPolicy< PageT >::notifyPageUnmap(), TwoQVictimPolicy< PageT >::notifyPageUnpin(), and TwoQVictimPolicy< PageT >::notifyPopularPageAccess().

00164 { 00165 assert(len == 1 || (page.getNext() != NULL || page.getPrev() != NULL)); 00166 if (&page == head && &page == tail) { 00167 assert(len == 1); 00168 head = tail = NULL; 00169 } else if (&page == head) { 00170 head = head->getNext(); 00171 } else if (&page == tail) { 00172 tail = tail->getPrev(); 00173 } 00174 page.detach(); 00175 assert(len > 0); 00176 len--; 00177 }