1<!--$Id: small.so,v 10.5 2006/08/24 16:32:27 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB Reference Guide: Building a small memory footprint library</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for Windows systems</dl></b></td>
13<td align=right><a href="../build_win/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_win/test.html"><img src="../../images/next.gif" alt="Next"></a>
14</td></tr></table>
15<p align=center><b>Building a small memory footprint library</b></p>
16<p>For applications that don't require all of the functionality of the full
17Berkeley DB library, an option is provided to build a static library with
18certain functionality disabled.  In particular, cryptography, hash and
19queue access methods, replication and verification are all turned off.
20This can reduce the memory footprint of Berkeley DB significantly.</p>
21<p>In general on Windows systems, you will want to evaluate the size of the
22final application, not the library build.  The Microsoft LIB file format
23(like UNIX archives) includes copies of all of the object files and
24additional information.  The linker rearranges symbols and strips out
25the overhead, and the resulting application is much smaller than the
26library.   There is also a Visual C++ optimization to "Minimize size"
27that will reduce the library size by a few percent.</p>
28<p>A Visual C++ project file called <b>db_small.dsp</b>  is provided for
29this small memory configuration, but is not included in the workspace
30by default.  To build, open Visual Studio and go to the <i>File</i>
31menu.  Choose <i>Open Workspace</i>, change <i>Files of Type</i>
32to <i>Projects (.dsp)</i> and open <i>db_small.dsp</i>.</p>
33<p>The project supports two configurations - <i>Release</i> and
34<i>Debug</i>.  During a build (F7), static libraries are created in
35<b>Release</b> or <b>Debug</b>, respectively.  The library name is
36<b>libdb_small47sd.lib</b> for the debug build, or
37<b>libdb_small47s.lib</b> for the release build.</p>
38<p>For assistance in further reducing the size of the Berkeley DB library, or in
39building small memory footprint libraries on other systems, please
40contact Berkeley DB support.</p>
41<table width="100%"><tr><td><br></td><td align=right><a href="../build_win/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_win/test.html"><img src="../../images/next.gif" alt="Next"></a>
42</td></tr></table>
43<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
44</body>
45</html>
46