7 Heap Info Library

The Heap Info Library gives the programmer access to information about the memory heaps of the program. BETA programs uses 3 different heaps:

The library defines two patterns, getHeapInfo and PrintHeapUsage.

PrintHeapUsage prints information on heap usage on standard output. It is used like this:

NAME 'MyProgram'
INCLUDE '~beta/sysutils/heapinfo'
PROGRAM: descriptor
do ...
   'Heap Info at program point a'->PrintHeapUsage;

getHeapInfo gives access to the individual data. The use is like this:

Program 2: Getting Heap Informations

(# ioasize:@integer;
do HeapInfoIOASize->getHeapInfo->ioasize;
   'my IOA-size is %d\n'
     ->putformat(# do ioasize->d #);

The argument to getHeapInfo is predefined constants. getHeapInfo evaluates to an integer. The library defines the following constants to be used with getHeapInfo:

System Utilities - Reference Manual
© 1994-2002 Mjølner Informatics
[Modified: Friday September 29th 2000 at 23:36]