Previous Contents Next

Chapter Overview

This chapter presents dynamic memory allocation strategies and garbage collection algorithms, in particular the one used by Objective CAML which is a combination of the presented algorithms. The first section provides background on different classes of memory and their characteristics. The second section describes memory allocation and compares implicit and explicit deallocation. The third section presents the major GC algorithms. The fourth section details Objective CAML's algorithm. The fifth section uses the Gc module to control the heap. The sixth section introduces the use of weak pointers from the Weak module to implement caches.


Previous Contents Next