• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/docs/programmer_reference/
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>Building a small memory footprint library</title>
7    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
10    <link rel="up" href="build_win.html" title="Chapter 28.  Building Berkeley DB for Windows" />
11    <link rel="prev" href="win_build_dist_dll.html" title="Distributing DLLs" />
12    <link rel="next" href="build_win_test.html" title="Running the test suite under Windows" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Building a small memory footprint library</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="win_build_dist_dll.html">Prev</a> </td>
22          <th width="60%" align="center">Chapter 28. 
23		Building Berkeley DB for Windows
24        </th>
25          <td width="20%" align="right"> <a accesskey="n" href="build_win_test.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="build_win_small"></a>Building a small memory footprint library</h2>
35          </div>
36        </div>
37      </div>
38      <p>For applications that don't require all of the functionality of the full
39Berkeley DB library, an option is provided to build a static library with
40certain functionality disabled.  In particular, cryptography, hash and
41queue access methods, replication and verification are all turned off.
42This can reduce the memory footprint of Berkeley DB significantly.</p>
43      <p>In general on Windows systems, you will want to evaluate the size of the
44final application, not the library build.  The Microsoft LIB file format
45(like UNIX archives) includes copies of all of the object files and
46additional information.  The linker rearranges symbols and strips out
47the overhead, and the resulting application is much smaller than the
48library.   There is also a Visual C++ optimization to "Minimize size"
49that will reduce the library size by a few percent.</p>
50      <p>A Visual C++ project file called <code class="filename">db_small</code> is
51provided for this small memory configuration.
52During a build, static libraries are created in
53<code class="filename">Release</code> or <code class="filename">Debug</code>, respectively.  The library name is
54<code class="filename">libdb_small48sd.lib</code> for the debug build, or
55<code class="filename">libdb_small48s.lib</code> for the release build.</p>
56      <p>For assistance in further reducing the size of the Berkeley DB library, or in
57building small memory footprint libraries on other systems, please
58contact Berkeley DB support.</p>
59    </div>
60    <div class="navfooter">
61      <hr />
62      <table width="100%" summary="Navigation footer">
63        <tr>
64          <td width="40%" align="left"><a accesskey="p" href="win_build_dist_dll.html">Prev</a> </td>
65          <td width="20%" align="center">
66            <a accesskey="u" href="build_win.html">Up</a>
67          </td>
68          <td width="40%" align="right"> <a accesskey="n" href="build_win_test.html">Next</a></td>
69        </tr>
70        <tr>
71          <td width="40%" align="left" valign="top">Distributing DLLs </td>
72          <td width="20%" align="center">
73            <a accesskey="h" href="index.html">Home</a>
74          </td>
75          <td width="40%" align="right" valign="top"> Running the test suite under Windows</td>
76        </tr>
77      </table>
78    </div>
79  </body>
80</html>
81