source: OGRE/trunk/ogrenew/Docs/api/html/memory_manager.html @ 692

Revision 692, 4.3 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1<html>
2<head>
3<title>The memory manager information page - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
4<link type="text/css" rel="stylesheet" href="style.css">
5</head>
6
7<body>
8<!-- Generated by Doxygen 1.3.6 -->
9<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
10<h1><a class="anchor" name="memory_manager">The memory manager information page</a></h1>The memory manager is a class that handles memory (de)allocation requests. <dl compact><dt><b></b></dt><dd>This class works like a wrapper between the actual C memory allocation functions (*alloc, free) and the memory (de)allocation requests of the application. </dd></dl>
11<dl compact><dt><b></b></dt><dd>Why would such a class be needed? First of all, because we had some major issues with memory getting misued (read: deleted) over DLL boundaries. One thing this memory manager does is solve the problem by allocating all the memory in the OgreMain.dll/so process. </dd></dl>
12<dl compact><dt><b></b></dt><dd>Another use would be leak detection and memory misuse detection. With a custom memory manager, calls to new/delete and *alloc/free could be overseed and logged. </dd></dl>
13<dl compact><dt><b></b></dt><dd>Yet another use is the optimization of memory allocation for certain object types. One of the most common examples is a small object allocator. </dd></dl>
14<p>
15There actually are two classes, one is the standard memory manager which only addresses memory allocation problems when deallocating across processes. <dl compact><dt><b></b></dt><dd>The other is a modified version of the debugging memory manager written by Paul 'MidNight' Nettle (aka. the Fluid Studios Memory Manager). Obviously, the second one should be used only when debugging your application as it adds some visible overhead. </dd></dl>
16<dl compact><dt><b></b></dt><dd>You can switch between the two memory managers by setting the value of the OGRE_DEBUG_MEMORY_MANAGER macro in <a class="el" href="OgreConfig_8h.html">OgreConfig.h</a> </dd></dl>
17<p>
18The class contains a static member of type <a class="el" href="classOgre_1_1MemoryManager.html">MemoryManager</a>. That is because we want the memory manager to be created even before we override the new([])/delete([]) operators. <p>
19<a href="http://www.flipcode.com/cgi-bin/msg.cgi?showThread=12September2000-PresentingAMemoryManager&forum=askmid&id=-1">Paul Nettle's Memory Manager page at flipCode</a> - you can get the original source form here. <hr>
20<p>
21Copyright &copy; 2000-2005 by The OGRE Team<br />
22<!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/>
23This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/>
24                <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
25                <Work rdf:about="">
26                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
27        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
28                </Work>
29                <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
30
31Last modified Sun Mar 12 14:38:00 2006
32</p>
33</body>
34</html>
Note: See TracBrowser for help on using the repository browser.