This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: simple pthread consumes memory




Lothar Werzinger-2 wrote:
> 
> balazs wrote:
> 
>> Hi - I start a simple pthread and the program consumes about 10 Mbytes of
>> virtual memory. If I start 10 threads, it consumes 100 Mbytes.
> 
> That's off topic, but the answer is that the default stack size for a
> thread
> on your machine seems to be 10M. If you know you don't need such a large
> stack, you can specify a custom stack size when creating the thread.
> 

Thank you, that solved the problem. 

I'm sorry for being off topic. Now I see this is not the right forum.

-- 
View this message in context: http://www.nabble.com/simple-pthread-consumes-memory-tf2320485.html#a6461140
Sent from the gcc - Dev mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]