# DbEnv.set_mp_mmapsize |

`

###

    import com.sleepycat.db.*;

    public void set_mp_mmapsize(long mmapsize)
    	throws DbException;

# Description

Files that are opened read-only in the pool (and that satisfy a few other criteria) are, by default, mapped into the process address space instead of being copied into the local cache. This can result in better-than-usual performance, as available virtual memory is normally much larger than the local cache, and page faults are faster than page copying on many systems. However, in the presence of limited virtual memory it can cause resource starvation, and in the presence of large databases, it can result in immense process sizes.

Set the maximum file size, in bytes, for a file to be mapped into the process address space. If no value is specified, it defaults to 10MB.

The DbEnv.set_mp_mmapsize interface may only be used to configure Berkeley DB before the DbEnv.open interface is called.

The DbEnv.set_mp_mmapsize method throws an exception that encapsulates a non-zero error value on failure.

# Errors

EINVAL
  An invalid flag value or parameter was specified.

  Called after DbEnv.open was called.

### Class

DbEnv

# See Also

DbEnv.memp_fstat, DbEnv.memp_stat and DbEnv.memp_trickle.`

Copyright Sleepycat Software