[ruby-cvs:54511] akr:r47363 (trunk): * process.c (retry_fork_async_signal_safe): Use vfork() if available.

akr at ruby-lang.org akr at ruby-lang.org
Wed Sep 3 12:06:18 JST 2014


akr	2014-09-03 12:06:17 +0900 (Wed, 03 Sep 2014)

  New Revision: 47363

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

  Log:
    * process.c (retry_fork_async_signal_safe): Use vfork() if available.
    
      vfork() is still faster than fork() especially when the parent
      process uses big memory.
    
      ruby -rbenchmark -e 'a = "a" * 1_000_000_000; puts Benchmark.measure { system("true") }'
      fork:   0.000000   0.010000   0.010000 (  0.014968)
      vfork:  0.000000   0.000000   0.000000 (  0.000912)
      on Debian sid.

  Modified files:
    trunk/ChangeLog
    trunk/process.c


More information about the ruby-cvs mailing list