Update of "Some notes on garbage collection"
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: a23c63d1ad5b9baab45768faf98153f8a2269a8f
Page Name:Some notes on garbage collection
Date: 2012-07-16 16:18:24
Original User: dg
Content

Herewith are some brief notes on garbage collection, current on 2012-07-16:

Right now cowjac has no garbage collection (which means garbage accrues indefinitely), but most of the hooks are in place for some. Actually adding a simple mark/sweep collector should be easy.

The basic setup is:

In order to do a collection, then, all we need to do is:

This is a stop-the-world collector, and is not necessarily that efficient. But it should be simple to implement, reasonably easy to debug, and may stand a chance of working.

Note that there a couple of places in cowjac where live references aren't anchored: exceptions in flight, for example. This imposes certain constraints on what we can do. These can probably all be fixed later, but for now this approach should be fine.