Reference/es_mb_savemap
Syntax
int es_mb_savemap( struct es_mb *db, const char *filen, unsigned bufsize );
Arguments
struct es_mb *db |
Database to be saved. |
const char *filen |
File name. |
unsigned bufsize |
Buffer size used in serializing database. |
Return Codes
ES_ERROR_NONE |
Success. No errors. |
ES_ERROR_FAILTOSAVE |
Failed to load. Check errno for any system errors. |
Description
es_mb_savemap serializes a database to disk in a special format that can be readily accessed by memory-mapping via es_mb_loadmap(). This can be very efficient if subsequent usage of the database only requires access to a few parts of it (via filtered iterating, for example) since only those portions would be loaded from disk.
es_mb_savemap is unlike es_mb_save() and its associated wrapper functions es_mb_savefile() and es_mb_savebuffer() in that it only saves root nodes (i.e. child and descendant nodes are ignored ) and ignores user-defined fields (defined via es_mbc_addfldmbu()).
[Back To Reference]
[Back To Reference/es_mb]
|