Berkeley DB Reference Guide:
Building Berkeley DB for UNIX/POSIX systems
PrevRefNext

Building a small memory footprint library

There are a set of configuration options to assist you in building a small memory footprint library. These configuration options turn off specific functionality in the Berkeley DB library, reducing the code size. These configuration options include:


--disable-cryptography --disable-hash --disable-queue --disable-replication --disable-statistics --disable-verify --enable-smallbuild

The following configuration options will increase the size of the Berkeley DB library dramatically and are only useful when debugging applications:


--enable-debug --enable-debug_rop --enable-debug_wop --enable-diagnostic

In addition, static libraries are usually smaller than shared libraries. By default Berkeley DB will build both shared and static libraries. To build only a static library, configure Berkeley DB with the --disable-shared option.

The size of the Berkeley DB library varies depending on the compiler, machine architecture, and configuration options. As an estimate, production Berkeley DB libraries built with GNU gcc version 3.X compilers have footprints in the range of 400KB to 900KB on 32-bit x86 architectures, and in the range of 500KB to 1MB on 64-bit x86 architectures.

For assistance in further reducing the size of the Berkeley DB library, or in building small memory footprint libraries on other systems, please contact Berkeley DB support.


PrevRefNext

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