From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: ruby-io-splice@bogomips.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 865E91FA58; Sat, 10 Jan 2015 03:27:16 +0000 (UTC) Date: Sat, 10 Jan 2015 03:27:16 +0000 From: Eric Wong To: ruby-io-splice@bogomips.org Subject: [PATCH] pack internal structs for 64-bit systems Message-ID: <20150110032716.GA4842@dcvr.yhbt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: This reduces stack usage in some places, perhaps providing a miniscule improvement in GC performance. struct before after difference splice_args 48 40 8 vmsplice_args 32 24 8 --- ext/io_splice/io_splice_ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/io_splice/io_splice_ext.c b/ext/io_splice/io_splice_ext.c index 2e2caec..276f3a6 100644 --- a/ext/io_splice/io_splice_ext.c +++ b/ext/io_splice/io_splice_ext.c @@ -125,8 +125,8 @@ static void * WITHOUT_GVL(rb_blocking_function_t *func, void *data1, struct splice_args { int fd_in; - off_t *off_in; int fd_out; + off_t *off_in; off_t *off_out; size_t len; unsigned flags; @@ -402,9 +402,9 @@ static VALUE trytee(int argc, VALUE *argv, VALUE self) struct vmsplice_args { int fd; + unsigned flags; struct iovec *iov; unsigned long nr_segs; - unsigned flags; }; static void * nogvl_vmsplice(void *ptr) -- EW