# DBENV->set_region_init |

`

###

    #include <db.h>

    int
    DBENV->set_region_init(DB_ENV *dbenv, int region_init);

# Description

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.

# Errors

EINVAL
  An invalid flag value or parameter was specified.

  Called after DBENV->open was called.

# See Also

DBENV->close, db_env_create, DBENV->open, DBENV->remove, DBENV->err, db_strerror, db_version, DBENV->set_cachesize, DBENV->set_errcall, DBENV->set_errfile, DBENV->set_errpfx, DBENV->set_mutexlocks, DBENV->set_pageyield, DBENV->set_paniccall, DBENV->set_region_init and DBENV->set_verbose.`

Copyright Sleepycat Software