next up previous contents index
Next: Maxavail Up: Functions and Procedures Previous: Lowercase

Mark

   

Declaration:

Procedure Mark (Var P : Pointer) ;

Description:

Mark copies the current heap-pointer to P.

Errors:

None.

See also:

Getmem, Freemem, New, Dispose, Maxavail

Example
Program Example39;

{ Program to demonstrate the Mark and Release functions. }

Var P,PP,PPP,MM : Pointer;

begin
  Getmem (P,100);
  Mark (MM);
  Writeln ('Getmem 100   : Memory available : ',MemAvail,' (marked)');
  GetMem (PP,1000);
  Writeln ('Getmem 1000  : Memory available : ',MemAvail);
  GetMem (PPP,100000);
  Writeln ('Getmem 10000 : Memory available : ',MemAvail);
  Release (MM);
  Writeln ('Released     : Memory available : ',MemAvail);    
  { At this point, PP and PPP are invalid ! }
end.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998