|
|
|
@ -21,24 +21,24 @@
|
|
|
|
|
#include "../MEM_guardedalloc.h"
|
|
|
|
|
#include <new>
|
|
|
|
|
|
|
|
|
|
void *operator new(size_t size, const char *str) throw(std::bad_alloc);
|
|
|
|
|
void *operator new[](size_t size, const char *str) throw(std::bad_alloc);
|
|
|
|
|
void *operator new(size_t size, const char *str);
|
|
|
|
|
void *operator new[](size_t size, const char *str);
|
|
|
|
|
|
|
|
|
|
/* not default but can be used when needing to set a string */
|
|
|
|
|
void *operator new(size_t size, const char *str) throw(std::bad_alloc)
|
|
|
|
|
void *operator new(size_t size, const char *str)
|
|
|
|
|
{
|
|
|
|
|
return MEM_mallocN(size, str);
|
|
|
|
|
}
|
|
|
|
|
void *operator new[](size_t size, const char *str) throw(std::bad_alloc)
|
|
|
|
|
void *operator new[](size_t size, const char *str)
|
|
|
|
|
{
|
|
|
|
|
return MEM_mallocN(size, str);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void *operator new(size_t size) throw(std::bad_alloc)
|
|
|
|
|
void *operator new(size_t size)
|
|
|
|
|
{
|
|
|
|
|
return MEM_mallocN(size, "C++/anonymous");
|
|
|
|
|
}
|
|
|
|
|
void *operator new[](size_t size) throw(std::bad_alloc)
|
|
|
|
|
void *operator new[](size_t size)
|
|
|
|
|
{
|
|
|
|
|
return MEM_mallocN(size, "C++/anonymous[]");
|
|
|
|
|
}
|
|
|
|
|