This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: simple pthread consumes memory
- From: Lothar Werzinger <lothar at tradescape dot biz>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 22 Sep 2006 17:19:00 -0700
- Subject: Re: simple pthread consumes memory
- References: <6456330.post@talk.nabble.com>
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.