Author Topic: cc1.exe: out of memory allocating 46418312 bytes  (Read 308 times)

Offline JamesC

  • Single posting newcomer
  • *
  • Posts: 2
cc1.exe: out of memory allocating 46418312 bytes
« 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10118
Re: cc1.exe: out of memory allocating 46418312 bytes
« Reply #1 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.
<debugger plugin maintainer>
(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!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5870
    • My Best Post
Re: cc1.exe: out of memory allocating 46418312 bytes
« Reply #2 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

Also post the compiler version information.
Code: [Select]
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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org