diff Allocator.cpp @ 697:2dfb67633b01

GUIButton Release Allocator BigMemory fix?
author zipi
date Sun, 17 Mar 2013 14:25:00 +0000
parents 2bc1c8d68f41
children efde64b3e147
line wrap: on
line diff
--- a/Allocator.cpp	Sun Mar 17 13:57:46 2013 +0000
+++ b/Allocator.cpp	Sun Mar 17 14:25:00 2013 +0000
@@ -75,7 +75,7 @@
 			  AbortWithError();
 		  }
 
-	  pMemoryBuffers[uNumBuffersUsed] = (char *)(pBigBufferAligned) + uNextFreeOffsetInBigBuffer;
+	  pMemoryBuffers[uNumBuffersUsed] = (char *)pBigMemoryBuffer + uNextFreeOffsetInBigBuffer;//(char *)(pBigBufferAligned) + uNextFreeOffsetInBigBuffer;
 	  uMemoryBuffersSizes[uNumBuffersUsed] =aligned_size;
 
 	  if (pName)
@@ -201,8 +201,8 @@
 	  for (indx = 0; indx <=uNumBuffersUsed; ++indx)
 		  if (pMemoryBuffers[indx] == ptr)	
 			  break;
-	//  if ((indx>uNumBuffersUsed)&& !aborting_app )
-//		  AbortWithError(); to detect memory problems - uncomment
+	  if ((indx>uNumBuffersUsed)&& !aborting_app )
+		  AbortWithError(); //to detect memory problems - uncomment
 	  if (!bUseBigBuffer)
 		  free(pMemoryBuffers[indx]);
 	  pMemoryBuffers[indx] = NULL;