[ruby-cvs:53918] ko1:r46772 (trunk): * symbol.c: remove rb_gc_mark_symbols().

ko1 at ruby-lang.org ko1 at ruby-lang.org
Thu Jul 10 01:19:15 JST 2014


ko1	2014-07-10 01:19:13 +0900 (Thu, 10 Jul 2014)

  New Revision: 46772

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

  Log:
    * symbol.c: remove rb_gc_mark_symbols().
      fstrings refered by static symbols and pinned dynamic symbols
      are registerd by rb_gc_register_mark_object().
      frstring refered by dynamic symbols (not pinned symbols)
      are refered from global_symbols.dsymbol_fstr_hash (Hash object).
      Note that fstrings refered from dynamic symbols must live loger
      than symbol objects themselves because rb_gc_free_dsymbol() uses
      fstring to remove from symbol tables.
      This is why we can not mark fstrings from dynamic symbols.
      This technique reduces root objects for GC marking.
    * gc.c (gc_mark_roots): ditto.
    * internal.h: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
    trunk/internal.h
    trunk/symbol.c


More information about the ruby-cvs mailing list