Skip to content
  • Peter Zhu's avatar
    51bd8165
    [Feature #20470] Split GC into gc_impl.c · 51bd8165
    Peter Zhu authored
    This commit splits gc.c into two files:
    
    - gc.c now only contains code not specific to Ruby GC. This includes
      code to mark objects (which the GC implementation may choose not to
      use) and wrappers for internal APIs that the implementation may need
      to use (e.g. locking the VM).
    
    - gc_impl.c now contains the implementation of Ruby's GC. This includes
      marking, sweeping, compaction, and statistics. Most importantly,
      gc_impl.c only uses public APIs in Ruby and a limited set of functions
      exposed in gc.c. This allows us to build gc_impl.c independently of
      Ruby and plug Ruby's GC into itself.
    51bd8165
    [Feature #20470] Split GC into gc_impl.c
    Peter Zhu authored
    This commit splits gc.c into two files:
    
    - gc.c now only contains code not specific to Ruby GC. This includes
      code to mark objects (which the GC implementation may choose not to
      use) and wrappers for internal APIs that the implementation may need
      to use (e.g. locking the VM).
    
    - gc_impl.c now contains the implementation of Ruby's GC. This includes
      marking, sweeping, compaction, and statistics. Most importantly,
      gc_impl.c only uses public APIs in Ruby and a limited set of functions
      exposed in gc.c. This allows us to build gc_impl.c independently of
      Ruby and plug Ruby's GC into itself.
Loading