Berkeley DB Reference Guide: Building a small memory footprint library
Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++

### 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 Win32 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 Static and Debug Static. During a build (F7), libraries are created in Release_small or Debug_small, respectively.

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

Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.