Ticket #670 (closed RFC: invalid)

Opened 13 years ago

Last modified 11 years ago

Rearranging the GC interface

Reported by: whiteknight Owned by:
Priority: normal Milestone:
Component: GC Version: 1.1.0
Severity: medium Keywords: gc
Cc: Language:
Patch status: Platform:


I'd like to propose a change to the GC API, and want some input before I start putting in deprecation notices.

The current function to start the GC process is "Parrot_gc_mark_and_sweep", formerly Parrot_do_gc_run I think. I would like to maybe deprecate this function and replace it with 3 new ones instead:

1) Parrot_gc_mark

2) Parrot_gc_sweep

3) Parrot_gc_increment

The Parrot_gc_mark and Parrot_gc_sweep functions together would do what Parrot_gc_mark_and_sweep do today, but would allow for GCs that break these two phases up in a non-stop-the-world kind of way. These two would map to two separate function pointers in the Arenas struct, so the GC cores can implement these functions separately (even if they always run together).

The third function Parrot_gc_increment would be called regularly, such as when the scheduler checks it's task. For non-incremental GCs this would be a noop, but for incremental ones it would run a portion of the GC sequence. This way we can get the work done without waiting for the header allocation functions to initiate the sweep when we run out of memory.


Change History

Changed 12 years ago by whiteknight

  • milestone 1.5 deleted

Changed 12 years ago by jkeenan

  • component changed from none to GC

Changed 11 years ago by Paul C. Anagnostopoulos

Some questions:

How can anything happen between the mark and the sweep without redering the marking obsolete?

Can you implement some form of incremental collection without requiring barriers everywhere?

Changed 11 years ago by bacek

  • status changed from new to closed
  • resolution set to invalid


I would like to reject this ticket. We do have GC_Subsystem interface now which encapsulate all GC internals. If we will need extension to this interface for Incremental/Generational/SomethingElse GC we can open another ticket.

-- Bacek

Note: See TracTickets for help on using tickets.