mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-06 20:45:57 +02:00
* 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:
parent
4f810f0918
commit
0d00df6ec5
@ -170,6 +170,9 @@ program pp;
|
|||||||
{$endif win32}
|
{$endif win32}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
{$ifdef heaptrc}
|
||||||
|
ppheap,
|
||||||
|
{$endif heaptrc}
|
||||||
{$ifdef cmem}
|
{$ifdef cmem}
|
||||||
cmem,
|
cmem,
|
||||||
{$endif cmem}
|
{$endif cmem}
|
||||||
@ -226,9 +229,6 @@ end;
|
|||||||
begin
|
begin
|
||||||
oldexit:=exitproc;
|
oldexit:=exitproc;
|
||||||
exitproc:=@myexit;
|
exitproc:=@myexit;
|
||||||
{$ifdef extheaptrc}
|
|
||||||
keepreleased:=true;
|
|
||||||
{$endif extheaptrc}
|
|
||||||
{ Call the compiler with empty command, so it will take the parameters }
|
{ Call the compiler with empty command, so it will take the parameters }
|
||||||
Halt(compiler.Compile(''));
|
Halt(compiler.Compile(''));
|
||||||
end.
|
end.
|
||||||
|
@ -120,7 +120,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
with pextra_info(p)^ do
|
with pextra_info(p)^ do
|
||||||
begin
|
begin
|
||||||
writeln(t,getfilename(fileindex)+'('+tostr(line)+','+tostr(col)+') ');
|
writeln(t,'Memory allocated at '+getfilename(fileindex)+'('+tostr(line)+','+tostr(col)+') ');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -132,7 +132,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if not pp_heap_inited then
|
if not pp_heap_inited then
|
||||||
begin
|
begin
|
||||||
|
{$ifdef extheaptrc}
|
||||||
keepreleased:=true;
|
keepreleased:=true;
|
||||||
|
{$endif extheaptrc}
|
||||||
SetHeapTraceOutput('heap.log');
|
SetHeapTraceOutput('heap.log');
|
||||||
SetHeapExtraInfo(sizeof(textra_info),
|
SetHeapExtraInfo(sizeof(textra_info),
|
||||||
@set_extra_info,
|
@set_extra_info,
|
||||||
|
Loading…
Reference in New Issue
Block a user