|
Release 4.0: memp_XXXThe C API for the Berkeley DB Memory Pool subsystem was reworked in the 4.0 release as follows:
Applications calling any of the memp_register, memp_stat, memp_sync or memp_trickle interfaces should update those calls to use the enclosing DB_ENV handle's method (easily done as the first argument to the existing call is the correct DB_ENV handle). In addition, the DB_ENV->memp_stat call has been changed in the 4.0 release to take a flags argument. To leave their historic behavior unchanged, applications should add a final argument of 0 to any calls made to DB_ENV->memp_stat. Applications calling the memp_fopen interface should update those calls as follows: First, acquire a DB_MPOOLFILE handle using the DB_ENV->memp_fcreate function. Second, if the DB_MPOOL_FINFO structure reference passed to the memp_fopen interface was non-NULL, call the DB_MPOOLFILE method corresponding to each initialized field in the DB_MPOOL_FINFO structure. Third, call the DB_MPOOLFILE->open function method to open the underlying file. If the DB_MPOOLFILE->open function call fails, then DB_MPOOLFILE->close function must be called to destroy the allocated handle. Applications calling the memp_fopen, memp_fclose, memp_fput, memp_fset, or memp_fsync interfaces should update those calls to use the enclosing DB_MPOOLFILE handle's method. Again, this is easily done as the first argument to the existing call is the correct DB_MPOOLFILE handle. With one exception, the calling conventions of the old a new interfaces are identical; the one exception is the DB_MPOOLFILE->close function, which requires an additional flag parameter that should be set to 0. |