Language:
Русский
English
{Maxavail.PAS}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
{Sample code for the MaxAvail function.}
type
FriendRec = record
Name: string[30];
Age: Byte;
end;
var
P: Pointer;
begin
if MaxAvail < SizeOf(FriendRec) then
Writeln('Not enough memory')
else
begin
{ Allocate memory on heap }
GetMem(P, SizeOf(FriendRec));
{ ... }
end;
end.