src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Tue Oct 22 18:51:55 2013
--- new/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Tue Oct 22 18:51:51 2013
*** 826,835 ****
--- 826,843 ----
static void current_stack_region(address * bottom, size_t * size) {
#ifdef __APPLE__
pthread_t self = pthread_self();
void *stacktop = pthread_get_stackaddr_np(self);
*size = pthread_get_stacksize_np(self);
+ // workaround for 10.9 (Mavericks)
+ // pthread_get_stacksize_np returns 128 pages even though the actual size is 2048 pages
+ if (pthread_main_np() == 1) {
+ #define DEFAULT_MAIN_THREAD_STACK_PAGES 2048
+ if (*size < (DEFAULT_MAIN_THREAD_STACK_PAGES*(size_t)getpagesize())) {
+ *size = (DEFAULT_MAIN_THREAD_STACK_PAGES*getpagesize());
+ }
+ }
*bottom = (address) stacktop - *size;
#elif defined(__OpenBSD__)
stack_t ss;
int rslt = pthread_stackseg_np(pthread_self(), &ss);
src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File