diff --git a/dlls/cstrike/amxxmodule.cpp b/dlls/cstrike/amxxmodule.cpp index 9dfe57be..e374e441 100755 --- a/dlls/cstrike/amxxmodule.cpp +++ b/dlls/cstrike/amxxmodule.cpp @@ -2909,6 +2909,28 @@ void operator delete[](void *reportedAddress) Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress); } +#else + +#if !defined NO_ALLOC_OVERRIDES && !defined MEMORY_TEST && !defined WIN32 +void * ::operator new(size_t size) { + return(calloc(1, size)); +} + +void * ::operator new[](size_t size) { + return(calloc(1, size)); +} + +void ::operator delete(void * ptr) { + if(ptr) + free(ptr); +} + +void ::operator delete[](void * ptr) { + if(ptr) + free(ptr); +} +#endif + #endif //MEMORY_TEST /************* stuff from dlls/util.cpp *************/ diff --git a/dlls/engine/amxxmodule.cpp b/dlls/engine/amxxmodule.cpp index 9dfe57be..e374e441 100755 --- a/dlls/engine/amxxmodule.cpp +++ b/dlls/engine/amxxmodule.cpp @@ -2909,6 +2909,28 @@ void operator delete[](void *reportedAddress) Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress); } +#else + +#if !defined NO_ALLOC_OVERRIDES && !defined MEMORY_TEST && !defined WIN32 +void * ::operator new(size_t size) { + return(calloc(1, size)); +} + +void * ::operator new[](size_t size) { + return(calloc(1, size)); +} + +void ::operator delete(void * ptr) { + if(ptr) + free(ptr); +} + +void ::operator delete[](void * ptr) { + if(ptr) + free(ptr); +} +#endif + #endif //MEMORY_TEST /************* stuff from dlls/util.cpp *************/ diff --git a/dlls/fun/amxxmodule.cpp b/dlls/fun/amxxmodule.cpp index 43ded3bf..e374e441 100755 --- a/dlls/fun/amxxmodule.cpp +++ b/dlls/fun/amxxmodule.cpp @@ -2911,7 +2911,7 @@ void operator delete[](void *reportedAddress) #else -#if !defined NO_ALLOC_OVERRIDES && !defined MEMORY_TEST +#if !defined NO_ALLOC_OVERRIDES && !defined MEMORY_TEST && !defined WIN32 void * ::operator new(size_t size) { return(calloc(1, size)); }