http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55808
Bug #: 55808 Summary: excessive memory usage from gcc 4.7.2 when compiling mame source code Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: mister.free...@laposte.net I notice that gcc 4.7.2 uses very excessive amount of memory when I compile the mame source code ( an arcade emulator ) : http://mamedev.org/release.html I have archlinux 32 bits on a virtualbox ( 4.2.6 version ) virtual machine ( CPU dual core 3.3 Ghz, 1 Gb ram and 512 Mb swap partition ), with PC configuration who have little memory ( 1 Gb for example ) and little swap partition ( 512 Mb ) it is impossible to compile mame, because the memory usage is excessive, I monitored the usage of the memory and gcc often takes almost 2 Gb of ram, if the system memory is too low ( 1 Gb physical ram and 512 Mb swap partition ) it will cause a fail with this error message : Compiling src/emu/cpu/tms32051/tms32051.c... Generating TMS57002 source file... obj/sdl/build/tmsmake src/emu/cpu/tms57002/tmsinstr.lst obj/sdl/emu/cpu/tms57002/tms57002.inc Compiling src/emu/cpu/tms57002/tms57002.c... {standard input}: Assembler messages: {standard input}:3066: Warning: end of file not at end of a line; newline inserted {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive gcc: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.archlinux.org/> for instructions. make: *** [obj/sdl/emu/cpu/tms57002/tms57002.o] Error 4 ==> ERROR: A failure occurred in build(). Aborting... if I use an older version of GCC ( for example : gcc 4.4.5 ) I can compile mame without problems on systems who have low memory ( 1 Gb and 512 Mb swap partition ), so it's clearly a regression bug in gcc 4.7.2, and check the first comment here ( padremayi ), same error with gcc 4.7.2 : https://aur.archlinux.org/packages/sdlmame-wout-gconf/?setlang=fr we need to improve the memory consumption of gcc