Changeset 21302 for trunk/src/kernel32/os2heap.cpp
- Timestamp:
- Jun 18, 2009, 11:53:26 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/os2heap.cpp
r8877 r21302 41 41 #include "dbglocal.h" 42 42 43 #include <_ras.h> 44 45 #ifdef RAS 46 RAS_TRACK_HANDLE rthHeap = 0; 47 #endif 48 43 49 #ifndef HEAP_NO_SERIALIZE 44 50 #define HEAP_NO_SERIALIZE 1 … … 94 100 else heap = this; 95 101 next = NULL; 102 103 #ifdef RAS 104 if (!rthHeap) 105 { 106 RasRegisterObjectTracking (&rthHeap, "Heap*, Global* and Local* memory", 107 0, RAS_TRACK_FLAG_MEMORY | RAS_TRACK_FLAG_LOG_AT_EXIT, 108 NULL, NULL); 109 } 110 #endif 96 111 97 112 heaplistmutex.leave(); … … 173 188 return(NULL); 174 189 } 190 191 RasTrackMemAlloc (rthHeap, dwAllocBytes); 192 175 193 if(dwFlags & HEAP_ZERO_MEMORY) { 176 194 memset(lpMem, 0, dwAllocBytes+HEAP_OVERHEAD); … … 238 256 if (dwBytes <= maxSize) { 239 257 dprintf(("ReAlloc with smaller size than original (%d); return old pointer", maxSize)); 258 259 RasTrackMemRealloc (rthHeap, helem->cursize, dwBytes); 260 240 261 //update current size so HeapSize will return the right value 241 262 helem->cursize = dwBytes; … … 280 301 #endif 281 302 303 RasTrackMemFree (rthHeap, helem->cursize); 304 282 305 free(helem->lpMem); 306 283 307 return(TRUE); 284 308 }
Note:
See TracChangeset
for help on using the changeset viewer.