Chapter 5. Memory Management

5.1. Introduction
5.2. Boehm-Weiser garbage collector
5.3. Memory limits
5.4. Memory Conditions
5.5. Finalization
5.6. Memory Management Reference
ext:stack-overflow — Stack overflow condition.
ext:storage-exhausted — Memory overflow condition.
ext:get-finalizer — Return finalizer associated to an object.
ext:get-limit — Query a memory or stack limit.
ext:set-finalizer — Associate a finalizer to an object.
ext:set-limit — Set a memory or stack limit.

5.1. Introduction

ECL relies on the Boehm-Weiser garbage collector for handling memory, creating and destroying objects, and handling finalization of objects that are no longer reachable. The use of a garbage collector, and in particular the use of a portable one, imposes certain restrictions that may appear odd for C/C++ programmers.

In this section we will discuss garbage collection, how ECL configures and uses the memory management library, what users may expect, how to handle the memory and how to control the process by which objects are deleted.