This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc 3.0: memory leak or not?
- To: <gcc at gcc dot gnu dot org>
- Subject: gcc 3.0: memory leak or not?
- From: Filip Bouljon <filip at frontierd dot com>
- Date: Fri, 22 Jun 2001 21:14:52 +0200 (CEST)
Hi,
I've been running some tests with gcc 3.0 and I'm only half satisfied with
the results. The compiler seems to perform quite well and to produce
correct code.
A performance problem of gcc 2.95.x (which I never reported however) seems
to be solved: the compile time increases quadratically with respect to the
number of data members of a class (both object and class static members).
One (generated) file (about 3MB) needed more than 38 hours to be compiled
on a PIII 1GHz without swapping. After working around the problem the
compile time was still 4 hours. Gcc 3.0 does the job in 30 or 15 minutes
respectively.
So far the good news.
Some other file of 64KB consumes a few hundred MB ram when it's compiled
with gcc 3.0. Originally the file was about double the size, but this one
failed to compile because it lacked memory (500MB virtual memory on this
machine; 700 on another...). The memory usage goes up to 295 MB, while
24M is the largest number I get from the -fmem-report output.
Does this mean there is a memory leak in GCC 3.0? Or does -fmem-report
not report what I think it does? How can I figure this out? I'm not sure
that I'm allowed to reveal the code (proprietary data).
The excessive memory usage occurs on all platforms I tried: Linux, Solaris
and HP-UX. The compiled code makes heavily use of A|RT Library, a C++
library which implements fixed-point numbers with templates, e.g. Int<20>
is a 20-bit signed integer, Fix<38,20> is a fixed point type of 38 bits
wide and a fractional part of 20 bits. (have a look on
http://www.frontierd.com/index_old.html, EDA tools, download area)
Thanks for your suggestions,
Filip
---------------------------------------------------------------
Filip Bouljon
Software Engineer Frontier Design
E-Mail: filip_bouljon@frontierd.com Abdijstraat 34
Phone: +32 16 391 419 3001 Heverlee
Fax: +32 16 406 076 Belgium
URL: http://www.frontierd.com
---------------------------------------------------------------