[ruby-cvs:54906] normal:r47758 (trunk): io.c (fptr_finalize): free memory before GC sweep

normal at ruby-lang.org normal at ruby-lang.org
Thu Oct 2 05:36:35 JST 2014


normal	2014-10-02 05:36:28 +0900 (Thu, 02 Oct 2014)

  New Revision: 47758

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

  Log:
    io.c (fptr_finalize): free memory before GC sweep
    
    This releases memory on explict calls to rb_io_close,
    reducing pressure on the GC.
    
    Final massif snapshot shows reduced heap usage after RubyGems load
    (valgrind --tool=massif ./ruby -e exit)
    
    before:
    mem_heap_B=4821992
    mem_heap_extra_B=1302952
    
    after:
    mem_heap_B=4791056
    mem_heap_extra_B=1192440

  Modified files:
    trunk/ChangeLog
    trunk/io.c


More information about the ruby-cvs mailing list