Lines Matching refs:page

53   /* Number of cache entries stored on each page.  Must be at least 1. */
58 * used page, and SENTINEL->PREV is the least recently used page.
59 * All pages in this list are "full"; the page currently being
63 /* A page currently being filled with entries, or NULL if there's no
64 * partially-filled page. This page is not in SENTINEL's list. */
88 /* A cache page; all items on the page are allocated from the same
99 * (The cache will never allocate more than TOTAL_PAGES page
104 /* A singly linked list of the entries on this page; used to remove
105 * them from the cache's HASH before reusing the page. */
119 /* The page it's on (needed so that the LRU list can be
121 struct cache_page *page;
123 /* Next entry on the page. */
131 remove_page_from_list(struct cache_page *page)
133 page->prev->next = page->next;
134 page->next->prev = page->prev;
140 struct cache_page *page)
144 page->prev = pred;
145 page->next = pred->next;
146 page->prev->next = page;
147 page->next->prev = page;
154 struct cache_page *page)
158 SVN_ERR_ASSERT(page != cache->sentinel);
160 if (! page->next)
163 remove_page_from_list(page);
164 insert_page(cache, page);
193 SVN_ERR(move_page_to_front(cache, entry->page));
281 * Finally, puts it in the "partial page" slot in the cache and sets
282 * partial_page_number_filled to 0. Must be called on a page actually
286 struct cache_page *page)
290 remove_page_from_list(page);
292 for (e = page->first_entry;
300 svn_pool_clear(page->page_pool);
302 page->first_entry = NULL;
303 page->prev = NULL;
304 page->next = NULL;
306 cache->partial_page = page;
321 /* Is it already here, but we can do the one-item-per-page
325 /* Special case! ENTRY is the *only* entry on this page, so
328 struct cache_page *page = existing_entry->page;
330 /* This can't be the partial page: items_per_page == 1
331 * *never* has a partial page (except for in the temporary state
333 SVN_ERR_ASSERT(page->next != NULL);
336 erase_page(cache, page);
343 struct cache_page *page = existing_entry->page;
345 SVN_ERR(move_page_to_front(cache, page));
352 page->page_pool));
366 /* Do we not have a partial page to put it on, but we are allowed to
377 /* Do we really not have a partial page to put it on, even after the
378 * one-item-per-page optimization and checking the unallocated page
386 /* Erase the page and put it in cache->partial_page. */
393 struct cache_page *page = cache->partial_page;
394 struct cache_entry *new_entry = apr_pcalloc(page->page_pool,
397 /* Copy the key and value into the page's pool. */
398 new_entry->key = duplicate_key(cache, key, page->page_pool);
404 page->page_pool));
415 /* Add the entry to the page's list. */
416 new_entry->page = page;
417 new_entry->next_entry = page->first_entry;
418 page->first_entry = new_entry;
424 /* We've added something else to the partial page. */
430 insert_page(cache, page);
512 SVN_ERR(move_page_to_front(cache, entry->page));
554 SVN_ERR(move_page_to_front(cache, entry->page));
560 entry->page->page_pool));
590 /* Be relatively strict: per page we should not allocate more than
680 * accidentally try to treat it like a real page.) */