[ruby-cvs:73153] normal:r66053 (trunk): io.c: reduce IO.copy_stream stack usage on Linux

normal at ruby-lang.org normal at ruby-lang.org
Wed Nov 28 09:35:22 JST 2018

normal	2018-11-28 09:35:22 +0900 (Wed, 28 Nov 2018)

  New Revision: 66053


    io.c: reduce IO.copy_stream stack usage on Linux
    nogvl_copy_file_range and nogvl_copy_stream_sendfile each
    used 344 bytes of stack before this change.  Now, they are
    inlined into nogvl_copy_stream_func which only uses 200 bytes
    of stack.
    "struct stat" is 144 bytes on my 64-bit Linux.
    Note: this doesn't affect GC (yet) since GVL is released;
    but increases safety if called from deep machine stacks.
    It will affect GC if Thread::Light is merged.

  Modified files:

More information about the ruby-cvs mailing list