Explorar o código

* heaptrc should not rely on the original SysAllocMem calling the heaptrace memory manager's functions

git-svn-id: trunk@42796 -
svenbarth %!s(int64=6) %!d(string=hai) anos
pai
achega
f88a98e976
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      rtl/inc/heaptrc.pp

+ 3 - 1
rtl/inc/heaptrc.pp

@@ -1291,7 +1291,9 @@ end;
 
 function TraceAllocMem(size:ptruint):Pointer;
 begin
-  TraceAllocMem:=SysAllocMem(size);
+  TraceAllocMem := TraceGetMem(size);
+  if Assigned(TraceAllocMem) then
+    FillChar(TraceAllocMem^, TraceMemSize(TraceAllocMem), 0);
 end;