version 1.9, 2003/06/02 19:34:12 |
version 1.10, 2004/01/22 21:48:02 |
|
|
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 */ |
u_long pagesize; /* file page size */ |
unsigned long pagesize; /* file page size */ |
int fd; /* file descriptor */ |
int fd; /* file descriptor */ |
/* page in conversion routine */ |
/* page in conversion routine */ |
void (*pgin)(void *, pgno_t, void *); |
void (*pgin)(void *, pgno_t, void *); |
|
|
void (*pgout)(void *, pgno_t, void *); |
void (*pgout)(void *, pgno_t, void *); |
void *pgcookie; /* cookie for page in/out routines */ |
void *pgcookie; /* cookie for page in/out routines */ |
#ifdef STATISTICS |
#ifdef STATISTICS |
u_long cachehit; |
unsigned long cachehit; |
u_long cachemiss; |
unsigned long cachemiss; |
u_long pagealloc; |
unsigned long pagealloc; |
u_long pageflush; |
unsigned long pageflush; |
u_long pageget; |
unsigned long pageget; |
u_long pagenew; |
unsigned long pagenew; |
u_long pageput; |
unsigned long pageput; |
u_long pageread; |
unsigned long pageread; |
u_long pagewrite; |
unsigned long pagewrite; |
#endif |
#endif |
} MPOOL; |
} MPOOL; |
|
|
|
|
MPOOL *mpool_open(void *, int, pgno_t, pgno_t); |
MPOOL *mpool_open(void *, int, pgno_t, pgno_t); |
void mpool_filter(MPOOL *, void (*)(void *, pgno_t, void *), |
void mpool_filter(MPOOL *, void (*)(void *, pgno_t, void *), |
void (*)(void *, pgno_t, void *), void *); |
void (*)(void *, pgno_t, void *), void *); |
void *mpool_new(MPOOL *, pgno_t *, u_int); |
void *mpool_new(MPOOL *, pgno_t *, unsigned int); |
void *mpool_get(MPOOL *, pgno_t, u_int); |
void *mpool_get(MPOOL *, pgno_t, unsigned int); |
int mpool_delete(MPOOL *, void *); |
int mpool_delete(MPOOL *, void *); |
int mpool_put(MPOOL *, void *, u_int); |
int mpool_put(MPOOL *, void *, unsigned int); |
int mpool_sync(MPOOL *); |
int mpool_sync(MPOOL *); |
int mpool_close(MPOOL *); |
int mpool_close(MPOOL *); |
#ifdef STATISTICS |
#ifdef STATISTICS |