{
unsigned int address;
unsigned int size;
- char *file;
+ const char *file;
void *backtrace[BACKTRACE_DEPTH];
unsigned char btcount;
unsigned short line;
allocList = new(AllocList);
info.address = addr;
- info.file = strdup(fname);
+ info.file = fname;
info.line = lnum;
info.size = asize;
info.type = type;
- info.btcount = backtrace( info.backtrace, BACKTRACE_DEPTH );
+ info.btcount = 0; //backtrace( info.backtrace, BACKTRACE_DEPTH );
singleLock s(memLock);
(*allocList)[addr]=info;
};
if ( i->second.type != type )
i->second.type=3;
else
- {
- free(i->second.file);
allocList->erase(i);
- }
}
};
-inline void * operator new(unsigned int size, const char *file, int line)
+inline void * operator new(size_t size, const char *file, int line)
{
void *ptr = (void *)malloc(size);
AddTrack((unsigned int)ptr, size, file, line, 1);
free(p);
};
-inline void * operator new[](unsigned int size, const char *file, int line)
+inline void * operator new[](size_t size, const char *file, int line)
{
void *ptr = (void *)malloc(size);
AddTrack((unsigned int)ptr, size, file, line, 2);
inline void eWarning(const char* fmt, ...)
{
}
- #define ASSERT(x) do { x; } while (0)
+ #define ASSERT(x) do { } while (0)
#endif //DEBUG
void eWriteCrashdump();