IBM Books

Language Environment Interface Reference

Utility Functions for Managing Memory

Language environments use the memory management utility functions to allocate storage owned by Net.Data, and to free storage that it allocated using the Net.Data run-time library.

The following example illustrates the need for these utility functions. Suppose that Net.Data is written using compiler A, with its corresponding run-time library. A programmer writes a new language environment, but uses compiler B, which has a different run-time library. The language environment cannot free storage that Net.Data allocated, and Net.Data cannot free storage that was allocated by the language environment because of potential incompatibilities between the two run-time libraries.

Table 1. Memory Management Utility Functions

Utility Function Description
dtw_malloc() Allocate storage from Net.Data's run-time heap using dtw_malloc().
dtw_free() Free storage allocated from Net.Data's run-time heap using dtw_malloc().
dtw_strdup() Allocate storage from Net.Data's run-time heap and copy the specified string into the allocated storage using dtw_malloc().


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]