• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/libc/db/mpool/

Lines Matching defs:page

110  *	Get a new page of memory.
119 (void)fprintf(stderr, "mpool_new: page allocation overflow.\n");
126 * Get a BKT from the cache. Assign a new page number, attach
143 return (bp->page);
147 mpool_delete(MPOOL *mp, void *page)
152 bp = (BKT *)((char *)page - sizeof(BKT));
157 "mpool_delete: page %d not pinned\n", bp->pgno);
174 * Get a page.
190 /* Check for a page that is cached. */
195 "mpool_get: page %d already pinned\n", bp->pgno);
200 * Move the page to the head of the hash chain and the tail
209 /* Return a pinned page. */
211 return (bp->page);
214 /* Get a page from the cache. */
220 if ((nr = pread(mp->fd, bp->page, mp->pagesize, off)) != (ssize_t)mp->pagesize) {
230 * new page.
232 memset(bp->page, 0, mp->pagesize);
246 /* Set the page number, pin the page. */
253 * Add the page to the head of the hash chain and the tail
262 (mp->pgin)(mp->pgcookie, bp->pgno, bp->page);
264 return (bp->page);
269 * Return a page.
273 mpool_put(MPOOL *mp, void *page, u_int flags)
280 bp = (BKT *)((char *)page - sizeof(BKT));
284 "mpool_put: page %d not pinned\n", bp->pgno);
336 * Get a page from the cache (or create one).
344 /* If under the max cached, always create a new page. */
369 spage = bp->page;
371 bp->page = spage;
383 bp->page = (char *)bp + sizeof(BKT);
391 * Write a page to disk.
404 (mp->pgout)(mp->pgcookie, bp->pgno, bp->page);
407 if (pwrite(mp->fd, bp->page, mp->pagesize, off) != (ssize_t)mp->pagesize)
411 * Re-run through the input filter since this page may soon be
417 (mp->pgin)(mp->pgcookie, bp->pgno, bp->page);
425 * Lookup a page in the cache.
462 "page size %lu, cacheing %lu pages of %lu page max cache\n",
464 (void)fprintf(stderr, "%lu page puts, %lu page gets, %lu page new\n",
466 (void)fprintf(stderr, "%lu page allocs, %lu page flushes\n",
473 (void)fprintf(stderr, "%lu page reads, %lu page writes\n",