You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.4 KiB
48 lines
1.4 KiB
Index: TMPPLib/Function.cpp |
|
--- TMPPLib/Function.cpp.orig 2008-05-11 01:19:58 +0200 |
|
+++ TMPPLib/Function.cpp 2008-08-06 18:17:32 +0200 |
|
@@ -61,18 +61,13 @@ |
|
void *CMemoryProcessor::ReAlloc( void *memblock, size_t size ) |
|
{ |
|
void *tmp; |
|
-#ifdef _WIN32 |
|
- size_t allocatedBytes = _msize(memblock); // Get size of memory block |
|
-#else |
|
- size_t allocatedBytes = malloc_usable_size(memblock); // Get size of memory block |
|
-#endif |
|
tmp = realloc(memblock, size); |
|
if (tmp==NULL) |
|
{ |
|
throw new OutOfMemoryException(L"", L"_realloc", L"Out of memory", GETDATE, GETFILE, GETLINE ); |
|
} |
|
// Store the number of bytes reallocated |
|
- g_allocatedBytes += size - allocatedBytes; |
|
+ g_allocatedBytes += size; |
|
return tmp; |
|
}; |
|
|
|
@@ -85,12 +80,6 @@ |
|
//if (g_showMemData) |
|
// wcout << L"CMemoryProcessor::Free: " << _msize(memblock) << L" bytes at " << memblock << endl; |
|
|
|
-#ifdef _WIN32 |
|
- g_allocatedBytes -= _msize(memblock); // Get size of memory block and subtract it |
|
-#else |
|
- g_allocatedBytes -= malloc_usable_size(memblock); // Get size of memory block and subtract it |
|
-#endif |
|
- |
|
free(memblock); // Free memory |
|
}; |
|
|
|
Index: TMPPLib/Function.h |
|
--- TMPPLib/Function.h.orig 2008-05-11 01:19:58 +0200 |
|
+++ TMPPLib/Function.h 2008-08-06 18:14:40 +0200 |
|
@@ -2,7 +2,7 @@ |
|
|
|
#include "DateTime.h" |
|
#include "BaseException.h" |
|
-#include <malloc.h> |
|
+#include <stdlib.h> |
|
|
|
#define UUIDSIZE 42 |
|
|
|
|