Modula-2 || Compiler & Tools || Library || Search Engine


Ulm's Modula-2 Library:
Storage


NAME

Storage, ALLOCATE, DEALLOCATE, Setmode - storage allocation

SYNOPSIS

PROCEDURE ALLOCATE(VAR a: ADDRESS; n: CARDINAL);

PROCEDURE DEALLOCATE(VAR a: ADDRESS; n: CARDINAL);

PROCEDURE Setmode(m: CARDINAL);

DESCRIPTION

ALLOCATE allocates n bytes memory and returns a pointer a to this storage area.

DEALLOCATE frees n bytes allocated storage starting at address a and sets a to NIL.

Setmode switches the mode of reaction on storage overflow. If m equals 1 ALLOCATE causes the abortion of the program (default). M equal 2 causes ALLOCATE to return a NIL pointer.

DIAGNOSTICS

ALLOCATE prints `No space available' to filedescriptor 2 in case of abortion.
Edited by: martin, last change: 1996/12/04, revision: 1.1, converted to HTML: 1996/12/11

Modula-2 || Compiler & Tools || Library || Search Engine