Fixed memory allocation
This commit is contained in:
@ -2689,8 +2689,6 @@ void ValidateMacros_DontCallThis_Smiley()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MEMORY_TEST
|
||||
|
||||
/************* MEMORY *************/
|
||||
// undef all defined macros
|
||||
#undef new
|
||||
@ -2804,7 +2802,7 @@ void *operator new(size_t reportedSize)
|
||||
return ptr;
|
||||
|
||||
// allocation failed
|
||||
throw std::bad_alloc();
|
||||
|
||||
}
|
||||
|
||||
void *operator new[](size_t reportedSize)
|
||||
@ -2817,7 +2815,7 @@ void *operator new[](size_t reportedSize)
|
||||
return ptr;
|
||||
|
||||
// allocation failed
|
||||
throw std::bad_alloc();
|
||||
|
||||
}
|
||||
|
||||
// Microsoft memory tracking operators
|
||||
@ -2831,7 +2829,7 @@ void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine)
|
||||
return ptr;
|
||||
|
||||
// allocation failed
|
||||
throw std::bad_alloc();
|
||||
|
||||
}
|
||||
void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine)
|
||||
{
|
||||
@ -2843,7 +2841,7 @@ void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine
|
||||
return ptr;
|
||||
|
||||
// allocation failed
|
||||
throw std::bad_alloc();
|
||||
|
||||
}
|
||||
|
||||
void operator delete(void *reportedAddress)
|
||||
@ -2862,8 +2860,6 @@ void operator delete[](void *reportedAddress)
|
||||
Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/************* stuff from dlls/util.cpp *************/
|
||||
// must come here because cbase.h declares it's own operator new
|
||||
|
||||
|
Reference in New Issue
Block a user