### Berkeley DB Reference Guide: Building Berkeley DB for Windows systems |

### Building a small memory footprint library

For applications that don't require all of the functionality of the full Berkeley DB library, an option is provided to build a static library with certain functionality disabled. In particular, cryptography, hash and queue access methods, replication and verification are all turned off. This can reduce the memory footprint of Berkeley DB significantly.

In general on Windows systems, you will want to evaluate the size of the final application, not the library build. The Microsoft LIB file format (like UNIX archives) includes copies of all of the object files and additional information. The linker rearranges symbols and strips out the overhead, and the resulting application is much smaller than the library. There is also a Visual C++ optimization to "Minimize size" that will reduce the library size by a few percent.

A Visual C++ project file called db_small.dsp is provided for this small memory configuration, but is not included in the workspace by default. To build, open Visual Studio and go to the File menu. Choose Open Workspace, change Files of Type to Projects (.dsp) and open db_small.dsp.

The project supports two configurations - Release and Debug. During a build (F7), static libraries are created in Release or Debug, respectively. The library name is libdb_small45sd.lib for the debug build, or libdb_small45s.lib for the release build.

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.

Copyright (c) 1996-2006 Oracle Corporation - All rights reserved.