ruby-changes:23964
From: nobu <ko1@a...>
Date: Sun, 10 Jun 2012 17:54:47 +0900 (JST)
Subject: [ruby-changes:23964] nobu:r36015 (trunk): gc.h: IS_STACK_DIR_UPPER
nobu 2012-06-10 17:54:38 +0900 (Sun, 10 Jun 2012) New Revision: 36015 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36015 Log: gc.h: IS_STACK_DIR_UPPER * gc.h (IS_STACK_DIR_UPPER): utility macro. Modified files: trunk/ChangeLog trunk/gc.h trunk/thread_pthread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 36014) +++ ChangeLog (revision 36015) @@ -1,5 +1,7 @@ -Sun Jun 10 17:54:31 2012 Nobuyoshi Nakada <nobu@r...> +Sun Jun 10 17:54:36 2012 Nobuyoshi Nakada <nobu@r...> + * gc.h (IS_STACK_DIR_UPPER): utility macro. + * thread_pthread.c (get_stack): seems stack size does not include guard size on Mac OS X. Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 36014) +++ thread_pthread.c (revision 36015) @@ -1342,7 +1342,7 @@ } size /= 5; if (size > water_mark) size = water_mark; - if (STACK_DIR_UPPER(1, 0)) { + if (IS_STACK_DIR_UPPER()) { if (size > ~(size_t)base+1) size = ~(size_t)base+1; if (addr > base && addr <= (void *)((char *)base + size)) return 1; } Index: gc.h =================================================================== --- gc.h (revision 36014) +++ gc.h (revision 36015) @@ -81,6 +81,7 @@ #define STACK_GROW_DIR_DETECTION VALUE stack_grow_dir_detection #define STACK_DIR_UPPER(a,b) STACK_UPPER(&stack_grow_dir_detection, (a), (b)) #endif +#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0) #if defined __GNUC__ && __GNUC__ >= 4 #pragma GCC visibility push(default) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/