Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] compact.c
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] compact.c
>From: Julie Farago <>
>Is there a paper on the compaction code (compact.c) of the garbage
>collector (in byterun/)? Even though the documentation in this file is
>really exceptional, I am a little confused by how the inversion of
>pointers is used to compact the heap. Is there an algorithm I should

There is no paper on compact.c itself, but the algorithm is not
original.  If I remember correctly, it is from this paper:

F. Lockwood Morris, A time- and space-efficient garbage compaction
algorithm, Communications of the ACM, v.21 n.8, p.662-665, Aug. 1978

The only tricky part is the double inversion of pointers to infix
headers.  If you really need it, I'll write up a short description and
put it on my web page.

-- Damien
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: