diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-30 01:26:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-30 01:26:05 +0000 |
commit | f8b3123eb9915562d4b6a9e50a8e93f547b59ae4 (patch) | |
tree | 32aebd279de80a69f835d4631fb4531d495f0ab4 /thread_pthread.c | |
parent | 5da55dfcb480ab2c3a5c2162ee004b155c198099 (diff) | |
download | ruby-f8b3123eb9915562d4b6a9e50a8e93f547b59ae4.tar.gz |
thread_pthread.c: fix vps_pagesize
* thread_pthread.c (hpux_attr_getstackaddr): vps_pagesize is defaulted
to 16 and in Kbytes. [ruby-core:56863]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 0cb5489f49..1e6b80ae49 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -518,16 +518,17 @@ size_t pthread_get_stacksize_np(pthread_t); * The vps_pagesize is 'Default user page size (kBytes)' * and could be retrieved by gettune(). */ - -static int hpux_attr_getstackaddr(const pthread_attr_t *attr, void *addr) +static int +hpux_attr_getstackaddr(const pthread_attr_t *attr, void *addr) { static uint64_t pagesize; size_t size; if (!pagesize) { if (gettune("vps_pagesize", &pagesize)) { - pagesize = 1024; + pagesize = 16; } + pagesize *= 1024; } pthread_attr_getstacksize(attr, &size); *addr = (void *)((size_t)((char *)_Asm_get_sp() - size) & ~(pagesize - 1)); |