| 85 | |
| 86 | |
| 87 | PagePtr PageManager::getPage(int index) |
| 88 | { |
| 89 | // In case someone forgot to call fetchPage() before calling this function or in the |
| 90 | // case a cached page were to get evicted since the time fetchPage() was called, |
| 91 | // we loop and try to fetch again if we couldn't get the page that we expected to |
| 92 | // be around. |
| 93 | while (true) |
| 94 | { |
| 95 | PagePtr p = getPageLocked(index); |
| 96 | if (p) |
| 97 | return p; |
| 98 | fetchPage(index); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | |
| 103 | PagePtr PageManager::getPageLocked(int index) |
no outgoing calls
no test coverage detected