瀏覽代碼

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

git-svn-id: trunk@42796 -
svenbarth 6 年之前
父節點
當前提交
f88a98e976
共有 1 個文件被更改,包括 3 次插入1 次删除
  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;