mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-19 23:56:17 +02:00
26 lines
420 B
ObjectPascal
26 lines
420 B
ObjectPascal
program TestVm2;
|
|
|
|
{$IFDEF WIN32}{$APPTYPE CONSOLE}{$ENDIF}
|
|
|
|
procedure Test;
|
|
var
|
|
P: Pointer;
|
|
begin
|
|
P:=nil;
|
|
ReAllocMem(P, 8);
|
|
ReAllocMem(P, 0);
|
|
end;
|
|
|
|
var MemBefore : longint;
|
|
begin
|
|
writeln(MemAvail);
|
|
MemBefore:=MemAvail;
|
|
Test;
|
|
writeln(MemAvail);
|
|
if MemBefore<>MemAvail then
|
|
begin
|
|
Writeln('ReAllocMem creates emory leaks');
|
|
Writeln('Bug 812 is not yet fixed');
|
|
Halt(1);
|
|
end;
|
|
end. |