Whole document tree
    

Whole document tree

Berkeley DB: memp_fclose

memp_fclose

APIRef

#include <db.h>

int memp_fclose(DB_MPOOLFILE *mpf);

Description

The memp_fclose function closes the source file indicated by the DB_MPOOLFILE structure. Calling memp_fclose does not imply a call to memp_fsync, i.e. no pages are written to the source file as as a result of calling memp_fclose.

In addition, if the file argument to memp_fopen was NULL, any underlying files created for this DB_MPOOLFILE will be removed.

Once memp_fclose has been called, regardless of its return, the DB_MPOOLFILE handle may not be accessed again.

The memp_fclose function returns a non-zero error value on failure and 0 on success.

Errors

The memp_fclose function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the memp_fclose function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.

See Also

DBENV->set_mp_mmapsize, memp_fclose, memp_fget, memp_fopen, memp_fput, memp_fset, memp_fsync, memp_register, memp_stat, memp_sync and memp_trickle.

APIRef

Copyright Sleepycat Software