/* * MemDebug.hpp * * Created on: Apr 28, 2010 * Author: crueger */ #ifndef MEMDEBUG_HPP_ #define MEMDEBUG_HPP_ namespace Memory { void getState(); void _ignore(void*); template T *ignore(T* ptr){ _ignore((void*)ptr); return ptr; } } void *operator new (size_t nbytes,const char* file, int line) throw(std::bad_alloc); void *operator new[] (size_t nbytes,const char* file, int line) throw(std::bad_alloc); void operator delete (void *ptr,const char*, int) throw(); void operator delete[] (void *ptr,const char*, int) throw(); #define new new(__FILE__,__LINE__) #endif /* MEMDEBUG_HPP_ */