This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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: compiler memory use optimization


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.


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