gtpm1m47TPF V4R1 Migration Guide: 3.1 to 4.1

Getting and Releasing Heap Storage

In the TPF 4.1 system, you can get main storage in contiguous pieces of nonstandard sizes from heap storage. Use the assembler macros and the IBM C language functions found in Table 54 to manage heap storage.

Table 54. Assembler Macros and IBM C Language Functions to Manage Heap Storage

Assembler Macro C Language Function Purpose
MALOC malloc To get variable-sized, doubleword-aligned blocks
RALOC realloc To change the size of (or resize) an allocated block
FREEC free To return blocks allocated by the MALOC and RALOC macros, or malloc and realloc IBM C language functions
CALOC calloc To get variable-sized, doubleword-aligned blocks initialized to binary zeros.

See the SAA Common Programming Interface C Reference - Level 2 for more information about the IBM C language functions.