[ruby-cvs:52714] ko1:r45568 (trunk): * array.c: make shared arrays WB-protected objects.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Fri Apr 11 17:47:01 JST 2014


ko1	2014-04-11 17:47:00 +0900 (Fri, 11 Apr 2014)

  New Revision: 45568

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

  Log:
    * array.c: make shared arrays WB-protected objects.
      Shared arrays were WB-unprotected object because
      sharing array can modify shared array's buffer
      if it occupied shared array.
      [sharing array (ary)] -> [shared array (shared)] -> <buff>
                    |                                       A
                    +---------------------------------------+
                 write `buff' with WB(ary, &buff[i], obj)
                 -> if `ary' and `shared' are old, then only `ary'
                    will be remembered.
                 -> traverse from `ary'. But `shared' is old, so
                    that written `obj' is not marked.
      It cause WB miss so that shared arrays were WB-unprotected.
      (WB-unprotected objects are marked everytime if it is living)
      This patch insert WB() for `shared' if it is needed.

  Modified files:
    trunk/ChangeLog
    trunk/array.c


More information about the ruby-cvs mailing list