ruby-changes:35597
From: normal <ko1@a...>
Date: Mon, 22 Sep 2014 09:46:39 +0900 (JST)
Subject: [ruby-changes:35597] normal:r47679 (trunk): ext/socket/*.c: trivial struct packing for 64-bit
normal 2014-09-22 09:46:25 +0900 (Mon, 22 Sep 2014) New Revision: 47679 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47679 Log: ext/socket/*.c: trivial struct packing for 64-bit * ext/socket/ancdata.c ({send,recv}msg_args_struct): 24 => 16 bytes * ext/socket/init.c (connect_arg): ditto * ext/socket/raddrinfo.c (getnameinfo_arg): 56 => 48 bytes Other big stack reductions are less trivial. Modified files: trunk/ChangeLog trunk/ext/socket/ancdata.c trunk/ext/socket/init.c trunk/ext/socket/raddrinfo.c Index: ChangeLog =================================================================== --- ChangeLog (revision 47678) +++ ChangeLog (revision 47679) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Sep 22 09:28:43 2014 Eric Wong <e@8...> + + * ext/socket/ancdata.c ({send,recv}msg_args_struct): 24 => 16 bytes + * ext/socket/init.c (connect_arg): ditto + * ext/socket/raddrinfo.c (getnameinfo_arg): 56 => 48 bytes + (reductions only for 64-bit systems) + Mon Sep 22 02:04:25 2014 Tanaka Akira <akr@f...> * lib/drb/drb.rb: Support graceful shutdown. Index: ext/socket/init.c =================================================================== --- ext/socket/init.c (revision 47678) +++ ext/socket/init.c (revision 47679) @@ -400,8 +400,8 @@ wait_connectable(int fd) https://github.com/ruby/ruby/blob/trunk/ext/socket/init.c#L400 struct connect_arg { int fd; - const struct sockaddr *sockaddr; socklen_t len; + const struct sockaddr *sockaddr; }; static VALUE Index: ext/socket/raddrinfo.c =================================================================== --- ext/socket/raddrinfo.c (revision 47678) +++ ext/socket/raddrinfo.c (revision 47679) @@ -312,11 +312,11 @@ struct getnameinfo_arg https://github.com/ruby/ruby/blob/trunk/ext/socket/raddrinfo.c#L312 { const struct sockaddr *sa; socklen_t salen; + int flags; char *host; size_t hostlen; char *serv; size_t servlen; - int flags; }; static void * Index: ext/socket/ancdata.c =================================================================== --- ext/socket/ancdata.c (revision 47678) +++ ext/socket/ancdata.c (revision 47679) @@ -1105,8 +1105,8 @@ ancillary_cmsg_is_p(VALUE self, VALUE vl https://github.com/ruby/ruby/blob/trunk/ext/socket/ancdata.c#L1105 #if defined(HAVE_SENDMSG) struct sendmsg_args_struct { int fd; - const struct msghdr *msg; int flags; + const struct msghdr *msg; }; static void * @@ -1358,8 +1358,8 @@ rsock_bsock_sendmsg_nonblock(int argc, V https://github.com/ruby/ruby/blob/trunk/ext/socket/ancdata.c#L1358 #if defined(HAVE_RECVMSG) struct recvmsg_args_struct { int fd; - struct msghdr *msg; int flags; + struct msghdr *msg; }; ssize_t -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/