[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-cvs
Subject:    [ruby-cvs:61613] ko1:r54451 (trunk): * gc.c: simplify allocate/free detecting logic at the end of ma
From:       ko1 () ruby-lang ! org
Date:       2016-03-31 8:21:35
Message-ID: 20160331082135.4CD6A61501 () svn ! ruby-lang ! org
[Download RAW message or body]

ko1	2016-03-31 17:21:35 +0900 (Thu, 31 Mar 2016)

  New Revision: 54451

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54451

  Log:
    * gc.c: simplify allocate/free detecting logic at the end of marking.
    
      Before this change, heap_pages_min_slots are calculated at the
      beggining sweeping phase. And this value is used at the end of
      *next* marking phase.
    
      To simplify it, we use this value at the end of this marking phase.
      It means that we don't need to store this value as global state.
    
      Also heap_pages_max_slots is calculated at the begging of sweeping
      phase and used at the end of sweeping phase.
      To simplify this logic, we introduced new global value
      heap_pages_freeable_pages it means extra pages count we can free.
      gc_sweep_step() checks this value and moves empty pages to tomb_heap
      not more than this value.
    
      Because of this fix, heap_pages_swept_slots is no longer needed.
    
    * gc.c (rb_objspace_t::heap_pages): restruct the objspace global
      status.
    
      remove the following fileds
        * swept_slots (and heap_pages_swept_slots)
        * min_free_slots (and heap_pages_min_free_slots)
        * max_free_slots (and heap_pages_max_free_slots)
      And add the following filed.
        * freeable_pages (and heap_pages_freeable_pages)
    
    * gc.c (heap_pages_free_unused_pages): unlink tomb heap pages
      because tomb heap should have only freeable pages.
    
    * gc.c (heap_extend_pages): add parameters for future extension.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic