This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: A very silly question


Dimitry Andric wrote:
I still need to try gcc 3.4.2 on a big C++ app I'm involved with at
work.  This is because gcc 3.4.0 ICE'd on it, hope it is fixed now...

I had a couple C++ problems with 3.4.0 and 3.4.1, but each problem was fixed in the next release before I noticed it!

Actually, for an embedded device I'm working on, we even use glibc
2.1.x.  This is because glibc 2.2.x and higher use 2 MB of stack space
per thread, whereas 2.1.x started with 16 kB, but using mmap() with
MAP_GROWSDOWN.  Actual commit here:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/manager.c.diff?r1=1.54&r2=1.55&cvsroot=glibc&f=h

So if you don't have swap, as is likely on such a device, you run out
of memory very quickly, if you want to have a multithreaded
application...

Or just use ulimit -s to set the default thread stack size smaller, maybe? People doing heavy multithreading need to care about that anyway, even on machines with virtual memory, since you run out of *address space* at only 500 threads with the default setting. - Dan


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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