Library Version 11.2.5.3

DB_MPOOLFILE->set_maxsize()
Prev | Chapter 8. The DB_MPOOLFILE Handle | Next

## DB_MPOOLFILE->set_maxsize()

    #include <db.h>

    int
    DB_MPOOLFILE->set_maxsize(DB_MPOOLFILE *mpf,
        u_int32_t gbytes, u_int32_t bytes);

Set the maximum size for the file to be gbytes gigabytes plus bytes. Attempts to allocate new pages in the file after the limit has been reached will fail.

To set the maximum file size for a particular database, call the `DB_MPOOLFILE->set_maxsize()` method using the DB_MPOOLFILE handle stored in the mpf field of the DB handle. Attempts to insert new items into the database after the limit has been reached may fail.

The `DB_MPOOLFILE->set_maxsize()` method configures a file in the cache, not only operations performed using the specified DB_MPOOLFILE handle.

The `DB_MPOOLFILE->set_maxsize()` method may be called at any time during the life of the application.

The `DB_MPOOLFILE->set_maxsize()` method returns a non-zero error value on failure and 0 on success.

### Parameters

#### bytes

The maximum size of the file is set to gbytes gigabytes plus bytes.

#### gbytes

The maximum size of the file is set to gbytes gigabytes plus bytes.

### Class

DB_ENV, DB_MPOOLFILE

### See Also

Memory Pools and Related Methods

Prev | Up | Next
DB_MPOOLFILE->set_lsn_offset() | Home | DB_MPOOLFILE->set_pgcookie()