From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15974 invoked by alias); 18 Nov 2004 22:30:36 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 15946 invoked from network); 18 Nov 2004 22:30:32 -0000 Received: from unknown (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org with SMTP; 18 Nov 2004 22:30:32 -0000 Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id iAIMb6r8002009 for ; Thu, 18 Nov 2004 14:37:06 -0800 (PST) Received: from relay3.apple.com (relay3.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.3.14) with ESMTP id ; Thu, 18 Nov 2004 14:31:10 -0800 Received: from [17.201.20.87] (mrs2.apple.com [17.201.20.87]) by relay3.apple.com (8.12.11/8.12.11) with ESMTP id iAIMUEZi016536; Thu, 18 Nov 2004 14:30:14 -0800 (PST) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v679) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Cc: gcc@gcc.gnu.org Content-Transfer-Encoding: 7bit From: Mike Stump Subject: Re: compiler memory use optimization Date: Thu, 18 Nov 2004 22:45:00 -0000 To: naje X-SW-Source: 2004-11/txt/msg00639.txt.bz2 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.