Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: JamesC on May 31, 2017, 08:48:19 am

Title: cc1.exe: out of memory allocating 46418312 bytes
Post by: JamesC on May 31, 2017, 08:48:19 am
Hi,

For many years I have been developing a complex program using Codeblocks and GNU GCC compiler.

I have been stopped dead in my tracks by error    cc1.exe: out of memory allocating 46418312 bytes.

I had, as a temporary measure, remmed out a portion of my program to get the system to compile but the problem has now re-appeared.

Yesterday I increased RAM in my machine from 4 GB to 8 GB but to no avail.

Have just tried adding  "-Wl,--stack=2000000" as an act of desperation but to no avail!

Any guidance on how to proceed would be gratefully received. I am desperate to get back to doing real work.

Jim.
Title: Re: cc1.exe: out of memory allocating 46418312 bytes
Post by: oBFusCATed on May 31, 2017, 08:50:53 am
Yes, go to a support channel of your compiler.
If the problem happens during linking - separate your project in more dll/so files
If it happens during compilation - separate it in more source files.
Title: Re: cc1.exe: out of memory allocating 46418312 bytes
Post by: stahta01 on May 31, 2017, 06:11:56 pm
Please read how to produce a full build log; and, then post it on an compiler support site.

http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

Also post the compiler version information.
Code
gcc --version

Will likely get the version info.

Note: This site does NOT support any compilers.

FYI: Your problem sounds like the old Precompiled Header Bug that started in GCC 4.7.? and has been fixed in current GCC 5.? releases.

Tim S.