This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Small testcase demonstrating template-free memory explosion problem.
- To: Corey Kosak <kosak at cs dot cmu dot edu>
- Subject: Re: Small testcase demonstrating template-free memory explosion problem.
- From: Mark Mitchell <mmitchell at usa dot net>
- Date: Mon, 12 Jan 1998 22:55:16 GMT
- Cc: egcs-bugs at cygnus dot com
- References: <19980113054621.20625.qmail@mx02.netaddress.usa.net>
- Reply-To: mmitchell at usa dot net
>>>>> "Corey" == Corey Kosak <kosak@cs.cmu.edu> writes:
>> This test case does not blow up for me with -O2. It uses less
>> than 5MB of memory. It's possible that either you don't have
>> some patch that I submitted, or that there's a problem on
>> alpha-dec-osf3.2 that's not visible on i686-pc-linux-gnu. I'm
>> not sure where to go from here.
Corey> Wow, that's really strange! But indeed, my experience is
Corey> the same as yours: Using freshly untarred (just egcs-core
Corey> and egcs-g++) and then compiled egcs-971225 with no
Corey> additional patches installed:
Corey> Random thought: could this problem be due to an improper
Corey> use of alloca() somewhere? gcc uses alloca() a lot, and
Corey> this intriguing warning appears in the man page for OSF
Corey> alloca:
Corey> Note
Corey> The alloca() function requires inclusion of
Corey> <alloca.h>. Without this header file, alloca() allocates
Corey> memory in the heap instead of the stack; this memory is not
Corey> necessarily freed when the cal- ling routine exits.
This could definitely be the problem. However, I don't know anything
about OSF. However, gcc also contains its own definition of alloca,
so I'm not sure.
--
Mark Mitchell mmitchell@usa.net
Stanford University http://www.stanford.edu