Core: heapdbg.cpp fixed

git-svn-id: svn://ultimatepp.org/upp/trunk@9250 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-11-30 12:39:56 +00:00
parent e52901cc1c
commit 82b80e2f20
2 changed files with 5 additions and 1 deletions

View file

@ -90,7 +90,11 @@ void *MemoryAlloc(size_t size)
#endif
static dword serial_number = 0;
DbgBlkHeader *p = (DbgBlkHeader *)MemoryAlloc_(sizeof(DbgBlkHeader) + size + sizeof(dword));
#if (defined(TESTLEAKS) || defined(HEAPDBG)) && defined(COMPILER_GCC) && defined(UPP_HEAP)
p->serial = sMemDiagInitCount == 0 || s_ignoreleaks ? 0 : ~ ++serial_number ^ (dword)(uintptr_t) p;
#else
p->serial = s_ignoreleaks ? 0 : ~ ++serial_number ^ (dword)(uintptr_t) p;
#endif
p->size = size;
if(s_allocbreakpoint && s_allocbreakpoint == serial_number)
__BREAK__;

View file

@ -347,7 +347,7 @@ public:
virtual void PutConsole(const char *s);
virtual void PutVerbose(const char *s);
virtual void PutLinking();
virtual void PutLinkingEnd(bool ok);
virtual void PutLinkingEnd(bool ok);
virtual const Workspace& IdeWorkspace() const;
virtual bool IdeIsBuilding() const;