Skip to main content

Posts

Showing posts from March, 2009

Garbage Collection Representations Continued II

The tagged pointer representation described in Xavier Leroy's ZINC paper is compelling in its simplicity. Most data manipulated in typical programs is integer or pointer-based in some way, so using a 1-bit tagged representation allows unboxed integers, resulting in an efficient representation of the most common data types. I've never been satisfied with the size header in heap-allocated types though, and the two bits reserved for GC pretty much forces you to use some mark-sweep variant. Integrating something like age-oriented collection with reference counting for the old generation would require an entirely new word for every block of memory. This is a prohibitive cost in functional programs. Removing the Size Header Reading about BIBOP techniques used in the Streamflow allocator gave me the idea of using page masking to determine the block size. As in Streamflow, consider an allocator where each page obtained from the OS was partitioned into a list of equally-sized blocks.