Subject: Re: [ecasound] strange compiler behaviour
From: Kai Vehmanen (k_AT_eca.cx)
Date: Sat Dec 29 2001 - 15:08:13 EET
On Sat, 29 Dec 2001, Gilles van Eeden wrote:
> during compilation of eca-iamode-parser.cpp, i get the following error:
[...]
> Cannot allocate 4245972 bytes after allocating 4825020 bytes
> make[3]: *** [eca-iamode-parser.lo] Error 1
This seems to be a common problem. Something in eca-iamode-parser.cpp
confuses gcc's optimizer pretty badly.
I did some testing, and it seems that the function register_commands()
which performs a set of STL map assignments is the source of problems. By
replacing register_commands() with a null function, compile time dropped
from 2mins to 6secs on my dual-466Mhz system.
I committed a patch to CVS which splits register_commands() into smaller
pieces. This seems to help. Compilation of the current CVS-version of
eca-iamode-parser.cpp takes 26secs.
To benchmark compilation...
cd ecasound/libecasound
time c++ -I.. -O2 -S eca-iamode-parser.cpp
rm eca-iamode-parser.s
PS Without the patch, compiling with gcc 2.91.66 (egcs 1.1.2)
and -O2, the compiler process takes up to 140MB of
memory.
-- http://www.eca.cx Audio software for Linux!-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request_AT_wakkanet.fi>.
This archive was generated by hypermail 2b28 : Sat Dec 29 2001 - 15:00:56 EET