Updates:
        Status: WontFix
        Cc: [email protected]

Comment #11 on issue 12396 by [email protected]: Use system default stack  
size for worker thread
http://code.google.com/p/chromium/issues/detail?id=12396

We found that the default stack size on Ubuntu 8.04 is 8 MB, which is much
bigger than I thought (1 MB or 512 KB).  Although I still think it is fine
to use the default stack size (there must be a reason it's the default),
it's a lot of work to explain and prove that's the case, so I'm marking this
bug WontFix.

Here are the two methods we used to get the default stack size.

w...@aes:~/tmp$ ulimit -s
8192

w...@aes:~/tmp$ cat stack_size.c
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>

int main() {
   pthread_attr_t attr;
   int rv;
   size_t stack_size;

   rv = pthread_attr_init(&attr);
   if (rv != 0) {
     fprintf(stderr, "pthread_attr_init failed: %d\n", rv);
     exit(1);
   }

   rv = pthread_attr_getstacksize(&attr, &stack_size);
   if (rv != 0) {
     fprintf(stderr, "pthread_attr_getstacksize failed: %d\n", rv);
     exit(1);
   }
   printf("default stack size %lu, or %lu KB\n",
       (unsigned long)stack_size,
       (unsigned long)stack_size / 1024);
   return 0;
}
w...@aes:~/tmp$ gcc -m32 -pthread stack_size.c
w...@aes:~/tmp$ ./a.out
default stack size 8388608, or 8192 KB
w...@aes:~/tmp$ gcc -m64 -pthread stack_size.c
w...@aes:~/tmp$ ./a.out
default stack size 8388608, or 8192 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to