소스 검색

* 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;