DbMpoolFile::set_maxsize |

`

    #include <db_cxx.h>

    int
    DbMpoolFile::set_maxsize(u_int32_t gbytes, u_int32_t bytes);

    int
    DbMpoolFile::get_maxsize(u_int32_t *gbytesp, u_int32_t *bytesp);

Description: DbMpoolFile::set_maxsize

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 DbMpoolFile::set_maxsize method using the DbMpoolFile 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 DbMpoolFile::set_maxsize method configures a file in the memory pool, not only operations performed using the specified DbMpoolFile handle.

The DbMpoolFile::set_maxsize method may be called at any time during the life of the application.

The DbMpoolFile::set_maxsize 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.

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.

Description: DbMpoolFile::get_maxsize

The DbMpoolFile::get_maxsize 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 DbMpoolFile::get_maxsize method may be called at any time during the life of the application.

Parameters
bytesp

- The bytesp parameter references memory into which the additional bytes of memory in the maximum file size is copied.

gbytesp

- The gbytesp parameter references memory into which the gigabytes of memory in the maximum file size is copied.

Class DbEnv, DbMpoolFile
See Also Memory Pools and Related Methods`

Copyright (c) 1996,2008 Oracle. All rights reserved.