June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db.h> int db_env_set_func_map(int (*func_map)(char *path, size_t len, int is_region, int is_rdonly, void **addr));
The Berkeley DB library requires the ability to map a file into memory and to create shared memory regions (which may or may not be backed by files). The func_map argument must conform to the following interface:
int map(char *path, size_t len, int is_region, int is_rdonly, void **addr);
The path argument is the name of a file.
The is_region argument will be zero if the intention is to map a file into shared memory. In this case, the map function must map the first len bytes of the file into memory and return a pointer to the mapped location in the memory location referenced by the ...