June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db.h> int memp_fget(DB_MPOOLFILE *mpf, db_pgno_t *pgnoaddr, u_int32_t flags, void **pagep);
The memp_fget function copies a pointer to the page with the page number specified by pgnoaddr, from the source file in the DB_MPOOLFILE, into the memory location referenced by pagep. If the page does not exist or cannot be retrieved, memp_fget will fail.
Page numbers begin at 0; that is, the first page in the file is page number 0, not page number 1.
The returned page is size_t type aligned.
The flags value must be set to 0 or by bitwise inclusively OR’ing together one or more of the following values.
DB_MPOOL_CREATE If the specified page does not exist, create it. In this case, the pgin function, if specified, is ...