This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: compiler memory use optimization
- From: Mike Stump <mrs at apple dot com>
- To: naje <najeiv at ukr dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 18 Nov 2004 14:30:12 -0800
- Subject: Re: compiler memory use optimization
- References: <E1CUr6T-000KRL-CB@storage.ukr.net>
On Nov 18, 2004, at 10:33 AM, naje wrote:
my program use C++ templates vary hard, so i've got much memory spent
for
compilation, and sometimes i've got "virtual memory exhaust" error.
Is there any way to find out which part of my program is hard to
compile to optimize it
Compile with -Q, and watch what is slow... Also, the { 20M -> 10M }
type numbers indicate how much memory was used by the compiler during
compilation of the corresponding function. The first is before GC, the
second is post GC.
Also, you might try a 4.0 snapshot with your code, so that you can see
the general trends, with some luck, it might be faster to compile and
require less memory.
Also, you can try things like -O2/-O0 and see if it is optimization
related, or not.