Eneboo - Documentación para desarrolladores
|
00001 // -*- C++ -*- 00002 00003 /* 00004 00005 Heap Layers: An Extensible Memory Allocation Infrastructure 00006 00007 Copyright (C) 2000-2004 by Emery Berger 00008 http://www.cs.umass.edu/~emery 00009 emery@cs.umass.edu 00010 00011 This program is free software; you can redistribute it and/or modify 00012 it under the terms of the GNU General Public License as published by 00013 the Free Software Foundation; either version 2 of the License, or 00014 (at your option) any later version. 00015 00016 This program is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with this program; if not, write to the Free Software 00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 00025 */ 00026 00038 #ifndef _HEAPLAYERS_H_ 00039 #define _HEAPLAYERS_H_ 00040 00041 namespace HL {}; 00042 00043 #include "hldefines.h" 00044 00057 #ifndef ALLOCATION_STATS 00058 #define ALLOCATION_STATS 0 00059 #endif 00060 00061 00062 00063 #ifdef _MSC_VER 00064 // 4786: Disable warnings about long (> 255 chars) identifiers. 00065 // 4512: Disable warnings about assignment operators. 00066 #pragma warning( push ) 00067 #pragma warning( disable:4786 4512 ) 00068 // Set inlining to the maximum possible depth. 00069 #pragma inline_depth(255) 00070 #define inline __forceinline 00071 #endif 00072 00073 00074 #include "util/sassert.h" 00075 // #include "utility.h" // convenient wrappers to replace C++ new & delete operators 00076 #include "util/dynarray.h" // an array that grows by doubling 00077 #include "util/myhashmap.h" 00078 00079 // Hiding machine dependencies. 00080 00081 #include "util/cpuinfo.h" 00082 #include "util/timer.h" // allows high-resolution timing across a wide range of platforms 00083 #include "util/guard.h" 00084 #include "util/fred.h" 00085 00086 // Lock implementations. 00087 00088 #include "spinlock.h" // spin-then-yield 00089 00090 #if defined(_WIN32) 00091 #include "util/winlock.h" // critical-sections (i.e., for Windows only) 00092 #include "util/recursivelock.h" // a wrapper for recursive locking 00093 #endif 00094 00095 00096 // Useful utilities. 00097 00098 #include "unique.h" 00099 #include "tryheap.h" 00100 00101 // Base heaps 00102 00103 #include "zoneheap.h" // a zone allocator (frees all memory when the heap goes out of scope) 00104 00105 // Adapters 00106 00107 #include "perclassheap.h" // make a per-class heap 00108 00109 00110 // Freelist-like heaps ("allocation caches") 00111 // NB: All of these should be used for exactly one size class. 00112 00113 #include "freelistheap.h" // a free list. Never frees memory. 00114 #include "fifofreelist.h" // a FIFO free list. 00115 #include "fifodlfreelist.h" // a doubly-linked FIFO free list. 00116 #include "boundedfreelistheap.h" // a free list with a bounded length. 00117 00118 00119 #include "nullheap.h" 00120 #include "coalesceheap.h" // A chunk heap with coalescing. 00121 #include "coalesceableheap.h" 00122 00123 // Utility heap layers 00124 00125 #include "sizethreadheap.h" // Adds size(ptr) & thread(ptr) methods 00126 #include "lockedheap.h" // Code-locks a heap 00127 #include "checkheap.h" // Raises assertions if malloc'ed objects aren't right. 00128 // #include "exceptionheap.h" // Raise an exception if a malloc fails. 00129 00130 #include "sanitycheckheap.h" // Check for multiple frees and mallocs of same locations. 00131 #include "ansiwrapper.h" // Provide ANSI C like behavior for malloc (alignment, etc.) 00132 00133 // Multi-threaded heaps 00134 // hashes the thread id across a number of heaps 00135 00136 #include "phothreadheap.h" // Private-heaps with ownership 00137 #include "threadheap.h" // Pure-private heaps (sort of) 00138 00139 // Generic heaps 00140 00141 #include "segheap.h" // A *very general* segregated fits allocator. 00142 00143 // "Standard" heap layers 00144 00145 #include "kingsleyheap.h" // A power-of-two size class allocator, 00146 // a la Chris Kingsley's BSD allocator. 00147 00148 // "Top" heaps. 00149 #include "mallocheap.h" // a thin wrapper around the system's malloc/free 00150 #include "mmapheap.h" // a wrapper around the system's virtual memory system 00151 00152 // the rest... 00153 00154 #include "oneheap.h" 00155 #include "debugheap.h" 00156 #include "sizeheap.h" 00157 #include "addheap.h" 00158 #include "profileheap.h" 00159 #include "sizeownerheap.h" 00160 #include "hybridheap.h" 00161 #include "traceheap.h" 00162 #include "stlallocator.h" 00163 #include "adapt.h" 00164 #include "util/dllist.h" 00165 #include "dlheap.h" 00166 // #include "logheap.h" 00167 #include "obstackheap.h" 00168 #include "sbrkheap.h" 00169 00170 #include "xallocHeap.h" // 197.parser's heap 00171 00172 #include "staticheap.h" 00173 00174 #ifdef _MSC_VER 00175 #pragma warning( pop ) 00176 #endif 00177 00178 #endif // _HEAPLAYERS_H_