Gdbm now supports the ability to set certain options on an already
ret = gdbm_setopt(dbf, option, value, size)
The parameters are:
optionwill be set.
The only legal option currently is GDBM_CACHESIZE, which sets the size of the internal bucket cache. This option may only be set once on each GDBM_FILE descriptor, and is set automatically to 100 upon the first access to the database.
The return value will be -1 upon failure, or 0 upon success. The global
gdbm_errno will be set upon failure.
For instance, to set a database to use a cache of 10, after opening it
gdbm_open, but prior to accessing it in any way, the following
code could be used:
int value = 10; ret = gdbm_setopt(dbf, GDBM_CACHESIZE, &value, sizeof(int));
Go to the first, previous, next, last section, table of contents.