DBENV->set_region_init |
![]() ![]() |
#include <db.h>int DBENV->set_region_init(DB_ENV *dbenv, int region_init);
In some applications, the expense of page-faulting the shared memory regions can affect performance, e.g., when the page-fault occurs while holding a lock, other lock requests can convoy and overall throughput may decrease. Setting region_init to a non-zero value specifies that shared regions be read or written, as appropriate, when the region is joined by the application.
This forces the underlying virtual memory and file systems to instantiate both the necessary memory and the necessary disk space. This can avoid out-of-disk space failures later on.
The DBENV->set_region_init interface may only be used to configure Berkeley DB before the DBENV->open interface is called.
The DBENV->set_region_init function returns a non-zero error value on failure and 0 on success.
Called after DBENV->open was called.
![]() ![]() |