diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-28 01:10:40 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-28 01:10:40 +0000 |
commit | db7338fd7518b068269aa102e821ac388f519cd9 (patch) | |
tree | 9a24c11108e985c0ae8ddf704cb3964b34d4cde7 /lib | |
parent | c5fe904f6ea24a1f38c6a3b33937067f9390ca70 (diff) |
io.c (rb_update_max_fd): use F_GETFL if possible
On 64-bit Linux, fstat() needs to fill out a 144 byte struct
while F_GETFL only needs to return 8 bytes.
Fwiw, F_GETFD requires an additional rcu_read_lock and bitmap
check; so it's obviously more expensive than F_GETFL on Linux.
Reduce stack usage of rb_update_max_fd from 184 to 24 bytes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions