small.html   [plain text]


<!--$Id: small.so,v 10.5 2006/08/24 16:32:27 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Building a small memory footprint library</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for Windows systems</dl></b></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>
</td></tr></table>
<p align=center><b>Building a small memory footprint library</b></p>
<p>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.</p>
<p>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.</p>
<p>A Visual C++ project file called <b>db_small.dsp</b>  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 <i>File</i>
menu.  Choose <i>Open Workspace</i>, change <i>Files of Type</i>
to <i>Projects (.dsp)</i> and open <i>db_small.dsp</i>.</p>
<p>The project supports two configurations - <i>Release</i> and
<i>Debug</i>.  During a build (F7), static libraries are created in
<b>Release</b> or <b>Debug</b>, respectively.  The library name is
<b>libdb_small47sd.lib</b> for the debug build, or
<b>libdb_small47s.lib</b> for the release build.</p>
<p>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.</p>
<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>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
</body>
</html>