diff --git a/ChangeLog b/ChangeLog index 73cdbcd986..ffedc38209 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sun Jul 20 12:44:23 2014 Eric Wong + + * include/ruby/io.h (rb_io_buffer_t): pack structure + Reduces rb_io_t from 200 to 192 bytes, allowing rb_io_t to + occupy one less cache line. + [Feature #10050] + Sun Jul 20 12:41:53 2014 Eric Wong * include/ruby/io.h (rb_io_t): shrink to 200 bytes from 216 on 64-bit diff --git a/include/ruby/io.h b/include/ruby/io.h index bdde9844e2..8f0367707e 100644 --- a/include/ruby/io.h +++ b/include/ruby/io.h @@ -51,12 +51,12 @@ extern "C" { RUBY_SYMBOL_EXPORT_BEGIN -typedef struct { +typedef PACKED_STRUCT(struct { char *ptr; /* off + len <= capa */ int off; int len; int capa; -} rb_io_buffer_t; +}) rb_io_buffer_t; typedef struct rb_io_t { FILE *stdio_file; /* stdio ptr for read/write if available */