summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-20 04:18:58 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-20 04:18:58 +0000
commit910d081d02ec6fd1fbfe028755a94065bf4c2661 (patch)
tree45900170ecc229edd2a46d249a79e1700f114abd
parentcc9e233e44650e011fb290527dd324f8b175d488 (diff)
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--include/ruby/io.h4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a6fb1e71ed..73cdbcd986 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun Jul 20 12:41:53 2014 Eric Wong <e@80x24.org>
+
+ * 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@80x24.org>
* include/ruby/oniguruma.h (struct re_pattern_buffer): shrink to 448
diff --git a/include/ruby/io.h b/include/ruby/io.h
index 4ecd4d0b46..bdde9844e2 100644
--- a/include/ruby/io.h
+++ b/include/ruby/io.h
@@ -59,8 +59,8 @@ typedef struct {
} 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 {
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;