WYRDTEK Home Features Reference Downloads About



int es_mb_loadmap( struct es_mb *db, const char *filen, unsigned bufsize );


struct es_mb *db Database to be loadd.
const char *filen File name.
unsigned bufsize Buffer size used in serializing database.

Return Codes

ES_ERROR_NONE Success. No errors.
ES_ERROR_FAILTOLOAD Failed to load. Check errno for any system errors.


es_mb_loadmap memory maps a database from a file that has been previously saved via es_mb_savemap(). This can be very efficient if only a few parts of the database are to be accessed (via filtered iterating, for example) since only those parts will be loaded from disk.

Like es_mb_savemap(), es_mb_loadmap() only loads root nodes (i.e. child and descendant nodes are ignored ) and ignores user-defined fields (defined via es_mbc_addfldmbu()).

The associated file is only un-mapped from memory when the database is deleted via es_mb_delete().

[Back To Reference] [Back To Reference/es_mb]