[前][次][番号順一覧][スレッド一覧]

ruby-changes:35512

From: normal <ko1@a...>
Date: Mon, 15 Sep 2014 16:31:54 +0900 (JST)
Subject: [ruby-changes:35512] normal:r47594 (trunk): trivial packing for on-stack structs

normal	2014-09-15 16:31:38 +0900 (Mon, 15 Sep 2014)

  New Revision: 47594

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

  Log:
    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.

  Modified files:
    trunk/ChangeLog
    trunk/io.c
    trunk/process.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47593)
+++ ChangeLog	(revision 47594)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Sep 15 16:21:10 2014  Eric Wong  <e@8...>
+
+	* 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@g...>
 
 	* ext/pathname/lib/pathname.rb (SAME_PATHS):
Index: io.c
===================================================================
--- io.c	(revision 47593)
+++ io.c	(revision 47594)
@@ -941,8 +941,8 @@ struct io_internal_write_struct { https://github.com/ruby/ruby/blob/trunk/io.c#L941
 #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_sequentia https://github.com/ruby/ruby/blob/trunk/io.c#L8462
 #ifdef HAVE_POSIX_FADVISE
 struct io_advise_struct {
     int fd;
+    int advice;
     off_t offset;
     off_t len;
-    int advice;
 };
 
 static VALUE
Index: process.c
===================================================================
--- process.c	(revision 47593)
+++ process.c	(revision 47594)
@@ -740,8 +740,8 @@ waitall_each(rb_pid_t pid, int status, V https://github.com/ruby/ruby/blob/trunk/process.c#L740
 #else
 struct waitpid_arg {
     rb_pid_t pid;
-    int *st;
     int flags;
+    int *st;
 };
 #endif
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]