Garbage Collection for Ada

Since Java success, garbage collectors have proved to be valuable for the construction of software. Complex designs with intensive memory usage can benefit from implicit memory deallocation.

In the context of real-time applications, garbage collectors have been traditionally avoided because of efficiency and schedulability considerations. However, during the past decade the industry has invested substantial resources to develop garbage collectors appropriate for real-time systems, like Real-Time Java implementations, embedded systems and hardware assisted methods. While Ada implementations have traditionally provided memory management facilities beyond unchecked deallocation and controlled types, support for garbage collection has been ignored by most.

During my last university years, I worked on an academic project consisting in the modification of the GNU Ada compiler (GNAT) to incorporate precise recovery of implicitly deallocated data. The approach taken relies on a new implementation-defined pragma used to mark data types for implicit deallocation.

Legacy sources using explicit deallocation can be easily adapted for garbage collection, or for simultaneous use of both deallocation paradigms, thus allowing to evaluate the impact of the garbage collector on existing applications.My professors and I decided to release most of the work hoping to encourage others to continue. We still hold the code because it is highly experimental.

However, if you are interested in it or the project itself, I would gladly solve any question or even help you to get started. In 2007 the project was presented in one of the Ada-Spain conferences and later in Ada-Europe.

Here you can find the slides and most of the documentation licensed under the GNU Free Documentation License except for an article we published. It's copyright belongs to Springer-Verlag. Although most of the documentation is in Spanish, the article is a good overall picture of what we achieved. I must admit that the main document is quite a heavy reading but I provide some English contents taken from it.