aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-15 07:31:38 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-15 07:31:38 +0000
commitd198d64e0464c141f70c49880bf511ac3dcd1162 (patch)
tree218dafddb673ccc9e33b2d22e9a4889021c33119
parent667d502adbb9cfa6aa9fcdfbd9e95e251c8f0ba7 (diff)
downloadruby-d198d64e0464c141f70c49880bf511ac3dcd1162.tar.gz
trivial packing for on-stack structs
* io.c (struct io_advise_struct): 32 => 24 bytes on 64-bit * io.c (struct io_internal_writev_struct): 24 => 16 bytes on 64-bit * process.c (struct waitpid_arg): ditto Slightly reduce stack pressure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--io.c4
-rw-r--r--process.c2
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0959d20a2c..e52a75bb4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Sep 15 16:21:10 2014 Eric Wong <e@80x24.org>
+
+ * io.c (struct io_advise_struct): 32 => 24 bytes on 64-bit
+ * io.c (struct io_internal_writev_struct): 24 => 16 bytes on 64-bit
+ * process.c (struct waitpid_arg): ditto
+
Mon Sep 15 10:29:25 2014 Natalie Weizenbaum <nweiz@google.com>
* ext/pathname/lib/pathname.rb (SAME_PATHS):
diff --git a/io.c b/io.c
index 7301cbd6d3..5909a0be50 100644
--- a/io.c
+++ b/io.c
@@ -941,8 +941,8 @@ struct io_internal_write_struct {
#ifdef HAVE_WRITEV
struct io_internal_writev_struct {
int fd;
- const struct iovec *iov;
int iovcnt;
+ const struct iovec *iov;
};
#endif
@@ -8462,9 +8462,9 @@ static VALUE sym_normal, sym_sequential, sym_random,
#ifdef HAVE_POSIX_FADVISE
struct io_advise_struct {
int fd;
+ int advice;
off_t offset;
off_t len;
- int advice;
};
static VALUE
diff --git a/process.c b/process.c
index c4965eca7e..1ea637a412 100644
--- a/process.c
+++ b/process.c
@@ -740,8 +740,8 @@ waitall_each(rb_pid_t pid, int status, VALUE ary)
#else
struct waitpid_arg {
rb_pid_t pid;
- int *st;
int flags;
+ int *st;
};
#endif