[ruby-cvs:59486] normal:r52335 (trunk): variable.c: reduce heap usage for autoload_data_i

normal at ruby-lang.org normal at ruby-lang.org
Thu Oct 29 10:14:46 JST 2015

normal	2015-10-29 10:14:45 +0900 (Thu, 29 Oct 2015)

  New Revision: 52335


    variable.c: reduce heap usage for autoload_data_i
    For the loader (first thread which hits autoload, it is wasteful
    to have extra elements on the stack.  For the lifetime of the
    process, it is wasteful to waste 2 words for every autoload
    entry.  So this makes full use of existing stack overhead
    while reducing heap overhead for long-lived autoload_data_i
    * variable.c (struct autoload_state): usable as wait-queue head
      (struct autoload_data_i): remove 2 words of overhead
      (autoload_i_mark): remove marking for thread
      (autoload_reset): adjust for struct changes
      (rb_autoload): ditto
      (rb_autoloading_value): ditto
      (rb_autoload_load): ditto
      (const_update): ditto

  Modified files:

More information about the ruby-cvs mailing list