Subj : Re: pthread_create and memory To : comp.programming.threads From : jd Date : Fri Mar 11 2005 11:42 am > I hava fedora core 2 linux system with kernel 2.6.5-1.358 and i have > installated the pthread library. I try to use the function pthread_create > (). > I done this simplex test:and work fine. > The only problem is that after each new thread the memory of my process in > increased of 10 MB !!! Why ?? Because each thread has it's own stack. In this case it looks like it's size is one megabyte - that's all. You can change size of process' stack using pthread_attr_setstacksize() function. pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, MY_STACK_SIZE); pthread_create(&tid, &attr, some_fun, some_arg); Error checking here and there and everything should be fine. JD .