mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 08:25:35 +00:00
Removing the last traces of the old custom new/delete operators
svn-id: r18094
This commit is contained in:
parent
eda6987525
commit
5286121524
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user