version 1.10, 2004/01/22 21:48:02 |
version 1.11, 2013/12/02 02:28:21 |
|
|
|
|
/* The BKT structures are the elements of the queues. */ |
/* The BKT structures are the elements of the queues. */ |
typedef struct _bkt { |
typedef struct _bkt { |
CIRCLEQ_ENTRY(_bkt) hq; /* hash queue */ |
TAILQ_ENTRY(_bkt) hq; /* hash queue */ |
CIRCLEQ_ENTRY(_bkt) q; /* lru queue */ |
TAILQ_ENTRY(_bkt) q; /* lru queue */ |
void *page; /* page */ |
void *page; /* page */ |
pgno_t pgno; /* page number */ |
pgno_t pgno; /* page number */ |
|
|
|
|
} BKT; |
} BKT; |
|
|
typedef struct MPOOL { |
typedef struct MPOOL { |
CIRCLEQ_HEAD(_lqh, _bkt) lqh; /* lru queue head */ |
TAILQ_HEAD(_lqh, _bkt) lqh; /* lru queue head */ |
/* hash queue array */ |
/* hash queue array */ |
CIRCLEQ_HEAD(_hqh, _bkt) hqh[HASHSIZE]; |
TAILQ_HEAD(_hqh, _bkt) hqh[HASHSIZE]; |
pgno_t curcache; /* current number of cached pages */ |
pgno_t curcache; /* current number of cached pages */ |
pgno_t maxcache; /* max number of cached pages */ |
pgno_t maxcache; /* max number of cached pages */ |
pgno_t npages; /* number of pages in the file */ |
pgno_t npages; /* number of pages in the file */ |