public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/19513] New: High memory usage when compiling multiple files at a time
@ 2005-01-18 21:56 ch at csh-consult dot dk
  2005-01-18 22:02 ` [Bug c/19513] [IMA] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: ch at csh-consult dot dk @ 2005-01-18 21:56 UTC (permalink / raw)
  To: gcc-bugs

Passing 250 or so files from a larger software project (about 3MB of 
sourcecode) to gcc at a time makes gcc use more than 400MB of memory. Possible 
more as I had to stop the compilation.

I created a much simpler example. 100 equal .c files each containing:

static void mainX() {}

where X varies from 1 to 10000. This gives me a slightly different behaviour. 
Compiling only one of the files consumes about 60MB memory. Compiling all of 
the 100 files consumes up to 142MB of memory. Then gcc crashes.

If I'm understanding how gcc compiles multiple files at the same time 
correctly, then gcc should release most of the memory used for compiling one 
file before it begins compiling the next. Is this correct? If so, then I would 
expect overall memory usage during compilation of the 100 equal .c files to be 
not much more than 60MB.


Reading specs from C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-ja
va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchroniz
ation --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)

Let me know if you need more information.

-- 
           Summary: High memory usage when compiling multiple files at a
                    time
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ch at csh-consult dot dk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-pc-mingw32
  GCC host triplet: i386-pc-mingw32
GCC target triplet: i386-pc-mingw32


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


^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <bug-19513-9937@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2010-05-10 21:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-18 21:56 [Bug c/19513] New: High memory usage when compiling multiple files at a time ch at csh-consult dot dk
2005-01-18 22:02 ` [Bug c/19513] [IMA] " pinskia at gcc dot gnu dot org
2005-01-18 22:32 ` ch at csh-consult dot dk
2005-01-19  7:38 ` pinskia at gcc dot gnu dot org
2005-01-19  7:58 ` pinskia at gcc dot gnu dot org
2005-01-19  7:59 ` pinskia at gcc dot gnu dot org
2005-01-19 13:06 ` ch at csh-consult dot dk
2005-01-19 13:57 ` pinskia at gcc dot gnu dot org
2005-01-25  6:17 ` pinskia at gcc dot gnu dot org
     [not found] <bug-19513-9937@http.gcc.gnu.org/bugzilla/>
2010-05-10 21:29 ` steven 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).