Mercurial > mm7
comparison Allocator.cpp @ 697:2dfb67633b01
GUIButton Release
Allocator BigMemory fix?
author | zipi |
---|---|
date | Sun, 17 Mar 2013 14:25:00 +0000 |
parents | 2bc1c8d68f41 |
children | efde64b3e147 |
comparison
equal
deleted
inserted
replaced
696:4e1b2a24a6e3 | 697:2dfb67633b01 |
---|---|
73 CreateFileDump( "Memory"); | 73 CreateFileDump( "Memory"); |
74 if ( !aborting_app ) | 74 if ( !aborting_app ) |
75 AbortWithError(); | 75 AbortWithError(); |
76 } | 76 } |
77 | 77 |
78 pMemoryBuffers[uNumBuffersUsed] = (char *)(pBigBufferAligned) + uNextFreeOffsetInBigBuffer; | 78 pMemoryBuffers[uNumBuffersUsed] = (char *)pBigMemoryBuffer + uNextFreeOffsetInBigBuffer;//(char *)(pBigBufferAligned) + uNextFreeOffsetInBigBuffer; |
79 uMemoryBuffersSizes[uNumBuffersUsed] =aligned_size; | 79 uMemoryBuffersSizes[uNumBuffersUsed] =aligned_size; |
80 | 80 |
81 if (pName) | 81 if (pName) |
82 strncpy(pMemoryBuffersNames[uNumBuffersUsed], pName, 11); | 82 strncpy(pMemoryBuffersNames[uNumBuffersUsed], pName, 11); |
83 uNextFreeOffsetInBigBuffer += aligned_size; | 83 uNextFreeOffsetInBigBuffer += aligned_size; |
199 if ((!bBigBufferAllocated)&& (!aborting_app )) | 199 if ((!bBigBufferAllocated)&& (!aborting_app )) |
200 AbortWithError(); | 200 AbortWithError(); |
201 for (indx = 0; indx <=uNumBuffersUsed; ++indx) | 201 for (indx = 0; indx <=uNumBuffersUsed; ++indx) |
202 if (pMemoryBuffers[indx] == ptr) | 202 if (pMemoryBuffers[indx] == ptr) |
203 break; | 203 break; |
204 // if ((indx>uNumBuffersUsed)&& !aborting_app ) | 204 if ((indx>uNumBuffersUsed)&& !aborting_app ) |
205 // AbortWithError(); to detect memory problems - uncomment | 205 AbortWithError(); //to detect memory problems - uncomment |
206 if (!bUseBigBuffer) | 206 if (!bUseBigBuffer) |
207 free(pMemoryBuffers[indx]); | 207 free(pMemoryBuffers[indx]); |
208 pMemoryBuffers[indx] = NULL; | 208 pMemoryBuffers[indx] = NULL; |
209 uMemoryBuffersSizes[indx] = 0; | 209 uMemoryBuffersSizes[indx] = 0; |
210 pMemoryBuffersNames[indx][0] = 0; | 210 pMemoryBuffersNames[indx][0] = 0; |