[ruby-cvs:57155] ko1:r50006 (trunk): * gc.c (gc_writebarrier_generational): add an alternative write

ko1 at ruby-lang.org ko1 at ruby-lang.org
Wed Mar 18 18:02:11 JST 2015


ko1	2015-03-18 18:02:10 +0900 (Wed, 18 Mar 2015)

  New Revision: 50006

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

  Log:
    * gc.c (gc_writebarrier_generational): add an alternative write
      barrier (WB) implementation.
      When finding reference from [Old obj] to [New obj] by WB, current
      implementation marks [Old obj] as remembered old objects and marks
      chilldren of [Old obj] at the beggining of marking.
      Added (but disabled) code changes current behaviour. This fix promote
      [New obj] to old and marks as a remembered old object. We can assume
      "new objects referred from old objects are maybe long-lived old
      objects".
      Disadvantage of added algorithm is we may promote unwilling
      short-lived objects. For example, consider many new objects push and
      pop to an old stack object. All of new objects (short-lived objects)
      promote to old objects unexpectedly.
      To compare these behaviour, I add this new code (but disabled it).

  Modified files:
    trunk/ChangeLog
    trunk/gc.c


More information about the ruby-cvs mailing list