Storage - Heap Storage

Heap storage can be allocated and freed in no particular order. Language Environment provides multiple heaps that may be dynamically created and discarded by using Language Environment callable services. Language Environment's heap storage is reliable because it provides a level of isolation and prevents common errors such as attempting to free a heap element that has already been freed.

Heap storage is shared among all program units and all threads in an enclave. Allocated heap storage remains allocated until it is explicitly freed by a thread or until the enclave terminates. Heap storage is typically controlled by the programmer through Language Environment run-time options and callable services.