[gclist] More questions for the FAQ

Michel Schinz schinz@studi.epfl.ch
25 Mar 1996 14:41:04 +0100


> Q: What are some successful products or projects which make use of 
>    garbage collection?

The Amiga Operating System (can we call that a successful project?)
uses some kind of GC for its fonts and dynamic libraries: each time a
font or a dynamic library is opened, its reference count is
incremented; when the font/library is closed, its reference count is
decremented. When the count reaches zero, the font/library is kept in
memory for further access, but as soon as the memory allocator fails
to find free memory, all libraries and fonts with a null access count
are flushed and the allocation is retried.

The reference counts, however, are managed explicitely bu the
programmer, by opening or closing a font/library (just like in the
file system example).

I think this is definitely an example of a (lazy?) reference counting
GC.

Also, with the newest versions of the OS, the programmer has a way of
adding "low memory handlers", that is functions which are
automatically called when the allocator finds no free memory. This
makes it possible to build system-wide GCs.

Michel.