[前][次][番号順一覧][スレッド一覧]

ruby-changes:30649

From: nobu <ko1@a...>
Date: Fri, 30 Aug 2013 10:26:12 +0900 (JST)
Subject: [ruby-changes:30649] nobu:r42728 (trunk): thread_pthread.c: fix vps_pagesize

nobu	2013-08-30 10:26:05 +0900 (Fri, 30 Aug 2013)

  New Revision: 42728

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42728

  Log:
    thread_pthread.c: fix vps_pagesize
    
    * thread_pthread.c (hpux_attr_getstackaddr): vps_pagesize is defaulted
      to 16 and in Kbytes.  [ruby-core:56863]

  Modified files:
    trunk/thread_pthread.c
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 42727)
+++ thread_pthread.c	(revision 42728)
@@ -518,16 +518,17 @@ size_t pthread_get_stacksize_np(pthread_ https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L518
  * 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));

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]