ruby-changes:34800
From: normal <ko1@a...>
Date: Sun, 20 Jul 2014 13:19:08 +0900 (JST)
Subject: [ruby-changes:34800] normal:r46883 (trunk): rb_io_t: shrink from 216 to 200 bytes on 64-bit
normal 2014-07-20 13:18:58 +0900 (Sun, 20 Jul 2014) New Revision: 46883 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46883 Log: rb_io_t: shrink from 216 to 200 bytes on 64-bit * include/ruby/io.h (rb_io_t): shrink to 200 bytes from 216 on 64-bit This puts us within 8 bytes of being three cache lines instead of four lines on x86-64. This breaks the ABI. [Feature #10050] Modified files: trunk/ChangeLog trunk/include/ruby/io.h Index: include/ruby/io.h =================================================================== --- include/ruby/io.h (revision 46882) +++ include/ruby/io.h (revision 46883) @@ -59,8 +59,8 @@ typedef struct { https://github.com/ruby/ruby/blob/trunk/include/ruby/io.h#L59 } rb_io_buffer_t; typedef struct rb_io_t { - int fd; /* file descriptor */ FILE *stdio_file; /* stdio ptr for read/write if available */ + int fd; /* file descriptor */ int mode; /* mode flags: FMODE_XXXs */ rb_pid_t pid; /* child's pid (for pipes) */ int lineno; /* number of lines read */ @@ -89,9 +89,9 @@ typedef struct rb_io_t { https://github.com/ruby/ruby/blob/trunk/include/ruby/io.h#L89 rb_econv_t *writeconv; VALUE writeconv_asciicompat; + int writeconv_initialized; int writeconv_pre_ecflags; VALUE writeconv_pre_ecopts; - int writeconv_initialized; VALUE write_lock; } rb_io_t; Index: ChangeLog =================================================================== --- ChangeLog (revision 46882) +++ ChangeLog (revision 46883) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Jul 20 12:41:53 2014 Eric Wong <e@8...> + + * include/ruby/io.h (rb_io_t): shrink to 200 bytes from 216 on 64-bit + This puts us within 8 bytes of being three cache lines instead of + four lines on x86-64. This breaks the ABI. + [Feature #10050] + Sun Jul 20 12:36:46 2014 Eric Wong <e@8...> * include/ruby/oniguruma.h (struct re_pattern_buffer): shrink to 448 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/