From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9191 invoked by alias); 17 Jun 2010 04:10:07 -0000 Received: (qmail 9072 invoked by uid 48); 17 Jun 2010 04:09:49 -0000 Date: Thu, 17 Jun 2010 04:10:00 -0000 Subject: [Bug c/44563] New: GCC uses a lot of RAM when compiling a large numbers of functions X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvoss at altsci dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-06/txt/msg01749.txt.bz2 When compiling a 5 MB C file with 65337 functions, gcc takes over 700 MB of ram compiling the file to assembly. Files with fewer functions (32769 and 16385) take exponentially less time. A workaround is to split the file into multiple c files and compile into intermediate files seperately. tinycc aka tcc takes 0.5 seconds to compile the same file. I'd be happy to provide more information and justifications for such a large number of functions, but I assume that the bug can be fixed without it. -- Summary: GCC uses a lot of RAM when compiling a large numbers of functions Product: gcc Version: 4.3.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jvoss at altsci dot com GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44563