1
<!--$Id: malloc.so,v 10.20 2001/04/03 16:27:58 bostic Exp $-->
2
<!--Copyright 1997-2004 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
4
<!--See the file LICENSE for redistribution information.-->
7
<title>Berkeley DB Reference Guide: Non-local memory allocation</title>
8
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
12
<table width="100%"><tr valign=top>
13
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Access Methods</dl></h3></td>
14
<td align=right><a href="../am_conf/dup.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../am_conf/bt_compare.html"><img src="../../images/next.gif" alt="Next"></a>
17
<h3 align=center>Non-local memory allocation</h3>
18
<p>Berkeley DB allocates memory for returning key/data pairs and statistical
19
information which becomes the responsibility of the application.
20
There are also interfaces where an application will allocate memory
21
which becomes the responsibility of Berkeley DB.</p>
22
<p>On systems in which there may be multiple library versions of the
23
standard allocation routines (notably Windows NT), transferring memory
24
between the library and the application will fail because the Berkeley DB
25
library allocates memory from a different heap than the application
26
uses to free it, or vice versa. To avoid this problem, the
27
<a href="../../api_c/env_set_alloc.html">DB_ENV->set_alloc</a> and <a href="../../api_c/db_set_alloc.html">DB->set_alloc</a> methods can be used to
28
give Berkeley DB references to the application's allocation routines.</p>
29
<table width="100%"><tr><td><br></td><td align=right><a href="../am_conf/dup.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../am_conf/bt_compare.html"><img src="../../images/next.gif" alt="Next"></a>
31
<p><font size=1><a href="../../sleepycat/legal.html">Copyright (c) 1996-2004</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font>