public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/11898] New: huge memory consumption when compiling simple repetitive programs
@ 2003-08-12 22:34 gcc-bugzilla at gcc dot gnu dot org
  2003-08-12 23:40 ` [Bug optimization/11898] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2003-08-12 22:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11898

           Summary: huge memory consumption when compiling simple repetitive
                    programs
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bjg at network-theory dot co dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

	C programs which consist of simple repeated function calls cause
        gcc to consume huge amounts of memory with -O2.  For example,
        a single program containing 2000 calls to another function
        requires a peak 90 megabytes of memory to compile (attached
        below).  A similar 4000 line program requires over 350
        megabytes.  These types of program are common in
        auto-generated test suites.  This was encountered in the test
        suite for GSL (GNU Scientific Library).

Environment:
System: Linux debian 2.4.19 #16 Wed May 21 09:48:43 BST 2003 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /home/bjg/ftp/gcc-3.3.1/configure --enable-languages=c : (reconfigured) /home/bjg/ftp/gcc-3.3.1/configure --enable-languages=c --prefix=/opt/gcc-3.3.1

How-To-Repeat:

No headers are needed to demonstrate this problem, and linking is not 
required, so a plain .c file has been supplied.

bjg|debian> ulimit -v 65536   # set a limit of 64MB on the process 
                              # for demonstration, or use your 
                              # preferred means of monitoring
                              # the process size
bjg|debian> /opt/gcc-3.3.1/bin/gcc -v -O2 -c fn.c
Reading specs from /opt/gcc-3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/specs
Configured with: /home/bjg/ftp/gcc-3.3.1/configure --enable-languages=c : (recon
figured) /home/bjg/ftp/gcc-3.3.1/configure --enable-languages=c --prefix=/opt/gc
c-3.3.1
Thread model: posix
gcc version 3.3.1
 /opt/gcc-3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/cc1 -quiet -v -D__GNUC__=3 -
D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 fn.c -quiet -dumpbase fn.c -auxbase fn
 -O2 -version -o /tmp/cc0KwLAc.s
GNU C version 3.3.1 (i686-pc-linux-gnu)
        compiled by GNU C version 3.3.1.
GGC heuristics: --param ggc-min-expand=34 --param ggc-min-heapsize=8192
ignoring nonexistent directory "/opt/gcc-3.3.1/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /opt/gcc-3.3.1/include
 /opt/gcc-3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/include
 /usr/include
End of search list.

cc1: out of memory allocating 24767912 bytes after a total of 6661440 bytes


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-01-19 13:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-12 22:34 [Bug c/11898] New: huge memory consumption when compiling simple repetitive programs gcc-bugzilla at gcc dot gnu dot org
2003-08-12 23:40 ` [Bug optimization/11898] " pinskia at gcc dot gnu dot org
2003-08-12 23:41 ` pinskia at gcc dot gnu dot org
2003-08-13 12:30 ` pinskia at gcc dot gnu dot org
2003-08-22 23:56 ` dhazeghi at yahoo dot com
2004-01-19 12:48 ` [Bug optimization/11898] [scheduler] " pinskia at gcc dot gnu dot org
2004-01-19 13:01 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).