ruby-changes:23927
From: nobu <ko1@a...>
Date: Sat, 9 Jun 2012 08:31:09 +0900 (JST)
Subject: [ruby-changes:23927] nobu:r35978 (trunk): thread_pthread.c: use stack info
nobu 2012-06-09 08:30:55 +0900 (Sat, 09 Jun 2012) New Revision: 35978 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35978 Log: thread_pthread.c: use stack info * thread_pthread.c (ruby_init_stack): use stack info if possible. Modified files: trunk/ChangeLog trunk/thread_pthread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 35977) +++ ChangeLog (revision 35978) @@ -1,3 +1,7 @@ +Sat Jun 9 08:30:52 2012 Nobuyoshi Nakada <nobu@r...> + + * thread_pthread.c (ruby_init_stack): use stack info if possible. + Sat Jun 9 08:21:32 2012 Eric Hodel <drbrain@s...> * README.EXT (prepare extconf.rb): Added note to see MakeMakefile for Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 35977) +++ thread_pthread.c (revision 35978) @@ -607,7 +607,7 @@ { size_t size = 0; size_t space = 0; -#if defined(HAVE_PTHREAD_ATTR_GET_NP) +#if defined(STACKADDR_AVAILABLE) void* addr; get_stack(&addr, &size); #elif defined(HAVE_GETRLIMIT) @@ -615,8 +615,8 @@ if (getrlimit(RLIMIT_STACK, &rlim) == 0) { size = (size_t)rlim.rlim_cur; } + space = size > 5 * 1024 * 1024 ? 1024 * 1024 : size / 5; #endif - space = size > 5 * 1024 * 1024 ? 1024 * 1024 : size / 5; native_main_thread.stack_maxsize = size - space; } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/