[ruby-cvs:69256] normal:r62075 (trunk): vm_core: use "int" for living_thread_num

normal at ruby-lang.org normal at ruby-lang.org
Sun Jan 28 06:04:36 JST 2018


normal	2018-01-28 06:04:36 +0900 (Sun, 28 Jan 2018)

  New Revision: 62075

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

  Log:
    vm_core: use "int" for living_thread_num
    
    We treat this as "int" through the vm_living_thread_num API
    anyways, and "pid_t" is still 32-bits with glibc on 64-bit
    platforms.  I expect it'll be a long time before anybody needs
    more than 2 billion native threads.  For now, let's save one
    cacheline on x86-64 (as reported by pahole(1)):
    
    before:  size: 1288, cachelines: 21, members: 45
     after:  size: 1280, cachelines: 20, members: 45

  Modified files:
    trunk/thread.c
    trunk/vm_core.h


More information about the ruby-cvs mailing list