Reference Counting ...

Advantages:

  1. Garbage collection can be incremental, rather than being done all at once. Garbage collection can occur in short pauses at frequent time intervals, rather than in one long pause.

  2. Time spent in collection is proportional to amount collected rather than to address space.

Disadvantages:

  1. More complexity in system functions ( cons, set!, set-car!, etc.).

  2. Requires storage bits within each pair, or other clever ways of representing counts.

  3. Cannot garbage-collect circular structures (since reference count never becomes zero).

Contents    Page-10    Prev    Next    Index