#include <db_cxx.h>
DbEnv::memp_trickle(int percent, int *nwrotep);

The DbEnv::memp_trickle() method ensures that a specified percent of the pages in the cache are clean, by writing dirty pages to their backing files.

The purpose of the DbEnv::memp_trickle() function is to enable a memory pool manager to ensure that a page is always available for reading in new information without having to wait for a write.

The DbEnv::memp_trickle() method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.



The percent parameter is the percent of the pages in the cache that should be clean.


The nwrotep parameter references memory into which the number of pages written to reach the specified percentage is copied.


The DbEnv::memp_trickle() method may fail and throw a DbException exception, encapsulating one of the following non-zero errors, or return one of the following non-zero errors: following non-zero errors:


An invalid flag value or parameter was specified.


DbEnv, DbMpoolFile

See Also

Memory Pools and Related Methods