HP 3000 Manuals

HEAP_DISPOSE [ HP Pascal/iX Reference Manual ] MPE/iX 5.0 Documentation


HP Pascal/iX Reference Manual

HEAP_DISPOSE 

HEAP_DISPOSE is an HP Pascal Option.

When the HEAP_DISPOSE compiler option is ON, the predefined procedure
dispose frees space in the heap so that the predefined procedure new can
reallocate it.  By default, such disposed space cannot be reused.

Syntax 

$HEAP_DISPOSE {ON }$
              {OFF}

Default       OFF

Location      At front.

Example 

     $HEAP DISPOSE ON$
     PROGRAM show_heap;
     TYPE
        big_array = ARRAY [1..1000] OF longreal;
     VAR
        ptr : ^big_array;
        i : integer;

     BEGIN
        FOR i := 1 TO maxint DO  {If HEAP_DISPOSE were OFF, the heap}
           BEGIN                 {would overflow and an error would occur}
              new(ptr);
              .
              .
              .
              dispose(ptr);
           END;
     END.



MPE/iX 5.0 Documentation