Static Public Member Functions | |
static void * | Alloc (tAllocationInfo const &info, size_t s) |
static void | Dispose (tAllocationInfo const &info, void *p) |
static void | DisposeButKeep (tAllocationInfo const &info, void *p) |
Definition at line 185 of file tMemManager.cpp.
void * tMemMan::Alloc | ( | tAllocationInfo const & | info, | |
size_t | s | |||
) | [static] |
Definition at line 1105 of file tMemManager.cpp.
References tMemManager::Alloc(), tMemManager::AllocDefault(), tMemManBase::Check(), malloc, MAX_SIZE, and tASSERT.
01106 { 01107 #ifndef DONTUSEMEMMANAGER 01108 #ifdef MEM_DEB 01109 #ifdef WIN32 01110 tASSERT(_CrtCheckMemory()); 01111 #endif 01112 Check(); 01113 #endif 01114 void *ret; 01115 if (inited && s < (MAX_SIZE << 2)) 01116 { 01117 tBottleNeck neck; 01118 ret=memman[((s+3)>>2)].Alloc( info ); 01119 } 01120 else 01121 { 01122 ret=tMemManager::AllocDefault(info, s); 01123 } 01124 #ifdef MEM_DEB 01125 Check(); 01126 #ifdef WIN32 01127 tASSERT(_CrtCheckMemory()); 01128 #endif 01129 #endif 01130 return ret; 01131 01132 #else 01133 return malloc(s); 01134 #endif
void tMemMan::Dispose | ( | tAllocationInfo const & | info, | |
void * | p | |||
) | [static] |
Definition at line 1154 of file tMemManager.cpp.
01156 { 01157 #ifndef DONTUSEMEMMANAGER 01158 #ifdef MEM_DEB 01159 #ifdef WIN32 01160 tASSERT(_CrtCheckMemory()); 01161 #endif 01162 Check(); 01163 #endif 01164 tMemManager::Dispose(info, p ); 01165 #ifdef MEM_DEB 01166 Check(); 01167 #ifdef WIN32 01168 tASSERT(_CrtCheckMemory()); 01169 #endif 01170 #endif 01171 #else
void tMemMan::DisposeButKeep | ( | tAllocationInfo const & | info, | |
void * | p | |||
) | [static] |
Definition at line 1136 of file tMemManager.cpp.
01138 { 01139 #ifndef DONTUSEMEMMANAGER 01140 #ifdef MEM_DEB 01141 #ifdef WIN32 01142 tASSERT(_CrtCheckMemory()); 01143 #endif 01144 Check(); 01145 #endif 01146 tMemManager::Dispose(info, p, true); 01147 #ifdef MEM_DEB 01148 Check(); 01149 #ifdef WIN32 01150 tASSERT(_CrtCheckMemory()); 01151 #endif 01152 #endif