News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

cc1.exe: out of memory allocating 46418312 bytes

Started by JamesC, May 31, 2017, 08:48:19 AM

Previous topic - Next topic

JamesC

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.

oBFusCATed

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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

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

Also post the compiler version information.

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.

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]