From 90037145dd3cce95e0a7719f5153fc9aa7d087b7 Mon Sep 17 00:00:00 2001 From: normal Date: Fri, 15 Aug 2014 00:25:34 +0000 Subject: rb_{thread,context,fiber}_struct: trivial packing * vm_core.h (rb_thread_struct): reorder to pack * cont.c (rb_context_struct, rb_fiber_struct): ditto On x86-64, these changes reduces: rb_thread_struct to 1000 bytes (from 1016) rb_context_struct to 1288 bytes (from 1312) rb_fiber_struct to 2272 bytes (from 2304) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- cont.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cont.c') diff --git a/cont.c b/cont.c index 738efb7820..2ff2cbb98c 100644 --- a/cont.c +++ b/cont.c @@ -89,8 +89,8 @@ enum context_type { typedef struct rb_context_struct { enum context_type type; - VALUE self; int argc; + VALUE self; VALUE value; VALUE *vm_stack; #ifdef CAPTURE_JUST_VALID_VM_STACK @@ -134,14 +134,14 @@ typedef struct rb_fiber_struct { rb_context_t cont; VALUE prev; enum fiber_status status; - struct rb_fiber_struct *prev_fiber; - struct rb_fiber_struct *next_fiber; /* If a fiber invokes "transfer", * then this fiber can't "resume" any more after that. * You shouldn't mix "transfer" and "resume". */ int transfered; + struct rb_fiber_struct *prev_fiber; + struct rb_fiber_struct *next_fiber; #if FIBER_USE_NATIVE #ifdef _WIN32 void *fib_handle; -- cgit v1.2.3