Commit 49821d94 by Zoltan Karsa

update memtrace

parent e733606f
...@@ -488,6 +488,13 @@ void operator delete[](void * p) THROW_NOTHING { ...@@ -488,6 +488,13 @@ void operator delete[](void * p) THROW_NOTHING {
memtrace::traced_delete(p,FDELETEARR); memtrace::traced_delete(p,FDELETEARR);
} }
void operator delete(void * p, size_t) THROW_NOTHING {
memtrace::traced_delete(p,FDELETE);
}
void operator delete[](void * p, size_t) THROW_NOTHING {
memtrace::traced_delete(p,FDELETEARR);
}
/* Visual C++ 2012 miatt kell, mert háklis, hogy nincs megfelelő delete, bár senki sem használja */ /* Visual C++ 2012 miatt kell, mert háklis, hogy nincs megfelelő delete, bár senki sem használja */
void operator delete(void * p, int, const char *) THROW_NOTHING { void operator delete(void * p, int, const char *) THROW_NOTHING {
......
...@@ -5,7 +5,7 @@ Keszitette: Peregi Tamas, BME IIT, 2011 ...@@ -5,7 +5,7 @@ Keszitette: Peregi Tamas, BME IIT, 2011
Kanari: Szeberenyi Imre, 2013., Kanari: Szeberenyi Imre, 2013.,
VS 2012: Szeberényi Imre, 2015., VS 2012: Szeberényi Imre, 2015.,
mem_dump: 2016. mem_dump: 2016.
inclue-ok: 2017., 2018. 2019. inclue-ok: 2017., 2018., 2019., 2021.
*********************************/ *********************************/
#ifndef MEMTRACE_H #ifndef MEMTRACE_H
...@@ -153,6 +153,13 @@ END_NAMESPACE ...@@ -153,6 +153,13 @@ END_NAMESPACE
#include <map> #include <map>
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>
#include <memory>
#include <iomanip>
#include <locale>
#include <typeinfo>
#include <ostream>
#include <stdexcept>
#include <ctime>
#endif #endif
#ifdef MEMTRACE_CPP #ifdef MEMTRACE_CPP
namespace std { namespace std {
...@@ -178,7 +185,7 @@ START_NAMESPACE ...@@ -178,7 +185,7 @@ START_NAMESPACE
#define realloc(old,size) TRACEC(traced_realloc)(old,size,#size,__LINE__,__FILE__) #define realloc(old,size) TRACEC(traced_realloc)(old,size,#size,__LINE__,__FILE__)
void * traced_realloc(void * old, size_t size, const char *size_txt, int line, const char * file); void * traced_realloc(void * old, size_t size, const char *size_txt, int line, const char * file);
void mem_dump(void const *mem, size_t size, FILE* fp); void mem_dump(void const *mem, size_t size, FILE* fp = stdout);
END_NAMESPACE END_NAMESPACE
...@@ -200,6 +207,10 @@ void * operator new[](size_t size) THROW_BADALLOC; ...@@ -200,6 +207,10 @@ void * operator new[](size_t size) THROW_BADALLOC;
void operator delete(void * p) THROW_NOTHING; void operator delete(void * p) THROW_NOTHING;
void operator delete[](void * p) THROW_NOTHING; void operator delete[](void * p) THROW_NOTHING;
// sized delete miatt: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3536.html
void operator delete(void * p, size_t) THROW_NOTHING;
void operator delete[](void * p, size_t) THROW_NOTHING;
/* Visual C++ 2012 miatt kell, mert háklis, hogy nincs megfelelő delete, bár senki sem használja */ /* Visual C++ 2012 miatt kell, mert háklis, hogy nincs megfelelő delete, bár senki sem használja */
void operator delete(void *p, int, const char *) THROW_NOTHING; void operator delete(void *p, int, const char *) THROW_NOTHING;
void operator delete[](void *p, int, const char *) THROW_NOTHING; void operator delete[](void *p, int, const char *) THROW_NOTHING;
...@@ -215,5 +226,8 @@ void operator delete[](void *p, int, const char *) THROW_NOTHING; ...@@ -215,5 +226,8 @@ void operator delete[](void *p, int, const char *) THROW_NOTHING;
#endif /*MEMTRACE_CPP*/ #endif /*MEMTRACE_CPP*/
#endif /*FROM_MEMTRACE_CPP*/ #endif /*FROM_MEMTRACE_CPP*/
#endif /*MEMCHECK*/ #else
#pragma message ( "MEMTRACE NOT DEFINED" )
#endif /*MEMTRACE*/
#endif /*MEMTRACE_H*/ #endif /*MEMTRACE_H*/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment