Skip to content

Commit

Permalink
* cont.c (FIBER_MACHINE_STACK_ALLOCATION_SIZE): Fiber stack size
Browse files Browse the repository at this point in the history
  don't need to keep multiple number of sizeof(VALUE).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
kosaki committed Jul 8, 2011
1 parent b43b6cf commit 4ad2d02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Fri Jul 8 13:06:09 2011 KOSAKI Motohiro <[email protected]>

* cont.c (FIBER_MACHINE_STACK_ALLOCATION_SIZE): Fiber stack size
don't need to keep multiple number of sizeof(VALUE).

Fri Jul 8 11:39:12 2011 Nobuyoshi Nakada <[email protected]>

* common.mk (sudo-precheck): true command is not standard on
Expand Down
4 changes: 2 additions & 2 deletions cont.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#define RB_PAGE_SIZE (pagesize)
#define RB_PAGE_MASK (~(RB_PAGE_SIZE - 1))
static long pagesize;
#define FIBER_MACHINE_STACK_ALLOCATION_SIZE (0x10000 / sizeof(VALUE))
#define FIBER_MACHINE_STACK_ALLOCATION_SIZE (0x10000)
#endif

#define CAPTURE_JUST_VALID_VM_STACK 1
Expand Down Expand Up @@ -607,7 +607,7 @@ fiber_setcontext(rb_fiber_t *newfib, rb_fiber_t *oldfib)
rb_thread_t *th = GET_THREAD(), *sth = &newfib->cont.saved_thread;

if (newfib->status != RUNNING) {
fiber_initialize_machine_stack_context(newfib, FIBER_MACHINE_STACK_ALLOCATION_SIZE * sizeof(VALUE));
fiber_initialize_machine_stack_context(newfib, FIBER_MACHINE_STACK_ALLOCATION_SIZE);
}

/* restore thread context */
Expand Down

0 comments on commit 4ad2d02

Please sign in to comment.