summaryrefslogtreecommitdiffstats
path: root/source/LeakFinder.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-24 18:41:54 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-24 18:41:54 +0100
commit9eff51d8317814e09d3f2cccaf80ef6ed099629e (patch)
treebe0c3d82726302604a6ee5d9debd553c77fb007a /source/LeakFinder.cpp
parentLeakFinder: Factored in the housekeeping overhead (diff)
downloadcuberite-9eff51d8317814e09d3f2cccaf80ef6ed099629e.tar
cuberite-9eff51d8317814e09d3f2cccaf80ef6ed099629e.tar.gz
cuberite-9eff51d8317814e09d3f2cccaf80ef6ed099629e.tar.bz2
cuberite-9eff51d8317814e09d3f2cccaf80ef6ed099629e.tar.lz
cuberite-9eff51d8317814e09d3f2cccaf80ef6ed099629e.tar.xz
cuberite-9eff51d8317814e09d3f2cccaf80ef6ed099629e.tar.zst
cuberite-9eff51d8317814e09d3f2cccaf80ef6ed099629e.zip
Diffstat (limited to 'source/LeakFinder.cpp')
-rw-r--r--source/LeakFinder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/LeakFinder.cpp b/source/LeakFinder.cpp
index 6439ff331..fcafd44c2 100644
--- a/source/LeakFinder.cpp
+++ b/source/LeakFinder.cpp
@@ -847,7 +847,7 @@ static int MyAllocHook(int nAllocType, void *pvData,
if (lRequest != 0)
{
// RequestID was found
- g_CurrentMemUsage -= nSize;
+ g_CurrentMemUsage -= nSize + CRTTable::AllocHashEntryTypeSize;
g_pCRTTable->Remove(lRequest);
}
} // freeing
@@ -865,7 +865,7 @@ static int MyAllocHook(int nAllocType, void *pvData,
pHead = pHdr(pvData);
// Try to find the RequestID in the Hash-Table, mark it that it was freed
lReallocRequest = pHead->lRequest;
- g_CurrentMemUsage -= pHead->nDataSize;
+ g_CurrentMemUsage -= pHead->nDataSize + CRTTable::AllocHashEntryTypeSize;
bRet = g_pCRTTable->Remove(lReallocRequest);
} // ValidHeapPointer
} // re-allocating