Removing the last traces of the old custom new/delete operators

svn-id: r18094
This commit is contained in:
Max Horn 2005-05-14 15:33:27 +00:00
parent eda6987525
commit 5286121524
2 changed files with 0 additions and 41 deletions

View File

@ -506,27 +506,3 @@ void CDECL debug(const char *s, ...) {
debugHelper(buf);
}
/*
#if !defined(__PALM_OS__) && !defined(_WIN32_WCE)
void *operator new(size_t size) {
return memset(malloc(size), 0xE7, size);
}
void operator delete(void *ptr) {
free(ptr);
}
#undef free
void free_check(void *ptr) {
if ((unsigned long)ptr == 0xE7E7E7E7UL) {
printf("ERROR: freeing 0xE7E7E7E7\n");
exit(1);
}
if ((unsigned long)ptr & 1) {
warning("Freeing odd address 0x%x", ptr);
}
free(ptr);
}
#endif
*/

View File

@ -512,21 +512,4 @@ FORCEINLINE uint32 READ_BE_UINT24(const void *ptr) {
#define STRINGBUFLEN 1024
#endif
/*
#if !defined(__PALM_OS__)
// Initialized operator new
void * operator new(size_t size);
void operator delete(void *ptr);
// Temporary hack until we fully remove the new/delete operators:
// Since 'new' now returns a memory block inited to 0xE7E7E7E7 we might
// get some invocations of free() with that param. We check for those here.
// That allows us to set a debugger breakpoint to catch it.
#ifndef _WIN32_WCE
#define free(x) free_check(x)
void free_check(void *ptr);
#endif
#endif
*/
#endif