* Only -dextheaptrc sets keepreleased to tue (meaning no memory is really released by heaptrc memory manager)

* -dheaptrc add heaptrc as first unit in main source.

git-svn-id: trunk@22424 -
This commit is contained in:
pierre 2012-09-19 07:57:31 +00:00
parent 4f810f0918
commit 0d00df6ec5
2 changed files with 6 additions and 4 deletions

View File

@ -170,6 +170,9 @@ program pp;
{$endif win32}
uses
{$ifdef heaptrc}
ppheap,
{$endif heaptrc}
{$ifdef cmem}
cmem,
{$endif cmem}
@ -226,9 +229,6 @@ end;
begin
oldexit:=exitproc;
exitproc:=@myexit;
{$ifdef extheaptrc}
keepreleased:=true;
{$endif extheaptrc}
{ Call the compiler with empty command, so it will take the parameters }
Halt(compiler.Compile(''));
end.

View File

@ -120,7 +120,7 @@ implementation
begin
with pextra_info(p)^ do
begin
writeln(t,getfilename(fileindex)+'('+tostr(line)+','+tostr(col)+') ');
writeln(t,'Memory allocated at '+getfilename(fileindex)+'('+tostr(line)+','+tostr(col)+') ');
end;
end;
@ -132,7 +132,9 @@ implementation
begin
if not pp_heap_inited then
begin
{$ifdef extheaptrc}
keepreleased:=true;
{$endif extheaptrc}
SetHeapTraceOutput('heap.log');
SetHeapExtraInfo(sizeof(textra_info),
@set_extra_info,