simple pthread consumes memory
Lothar Werzinger
lothar@tradescape.biz
Sat Sep 23 00:44:00 GMT 2006
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.
More information about the Gcc
mailing list