New SDK for gcc-3 compilations

This commit is contained in:
David Anderson
2005-08-18 06:34:34 +00:00
parent 29bfd81b36
commit fa64bef511
6 changed files with 57 additions and 7 deletions

View File

@ -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
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 *************/

View File

@ -27,6 +27,10 @@
// be careful of default constructors using new/malloc!
// #define MEMORY_TEST
// Unless you use STL or exceptions, keep this commented.
// It allows you to compile without libstdc++.so as a dependency
// #define NO_ALLOC_OVERRIDES
// - AMXX Init functions
// Also consider using FN_META_*
// AMXX query
@ -465,4 +469,4 @@
#endif // USE_METAMOD
#endif // __MODULECONFIG_H__
#endif // __MODULECONFIG_H__