スレッドのスタックサイズ thread stack size
/***
* http://www.linuxquestions.org/questions/linux-newbie-8/default-stack-size-on-linux-glibc-pthreads-358438/
***/
#include <pthread.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
size_t stacksize;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_getstacksize (&attr, &stacksize);
printf("Default stack size = %d\n", stacksize);
}
$ gcc -o stacksize stacksize.c -lpthread
$ ./stacksize
Default stack size = 2097152
2012年8月11日土曜日
スレッドのスタックサイズ thread stack size
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿