I’m developing a Windows game that needs a lot of small different images, that I put in resources.qrc, they are in tot. 14 MB.
When I try to compile the only error is: «out of memory allocating 134 MB» «cc1plus.exe not found».
How can I handle this?
asked Sep 1, 2012 at 20:47
2
Windows 7SP1 x86 4 GB RAM
Qt 5.7.0
I had the same problem, when I added big file in resources in Qt. I had the error:
cc1plus.exe:-1: error: out of memory allocating 1073745919 bytes
Solution:
Add CONFIG += resources_big
into the *.pro
file.
I took it here: cc1plus.exe: out of memory | 60MB encrypted resource file
answered Aug 4, 2017 at 9:25
1
Don’t put them in the qrc, keep them as individual resources (or a new qrc file for each of the image), and just load them on application startup. Qt generates a qrc_XXXXX.cpp file where it effectively inserts the binary data in form of char array of ALL your resources in the resource fileXXXXX in this file (yes, ONE array for your images of 14MB, ie: 14680064 bytes (written as hex (0xXX) bytes into 1 file… it will be big!), highly possibly poor compiler just coughs on them…
answered Sep 1, 2012 at 21:22
Ferenc DeakFerenc Deak
34.1k17 gold badges99 silver badges166 bronze badges
Well, I had this problem too. But in my situation putting all resources into .exe
was necessary.
After this error I bought additional RAM (project is very important) and then my RAM became 12 GB (from 6 GB).
But I was very surprised when error hadn’t disappeared After some googling, finally, I found answer there. The problem is cc1plus.exe
executable memory limit. So, in case of Qt this problem can be solved in these steps (for Windows 7, MinGW32 4.9.2, for others probably simply needs to change paths):
- If your OS is 32 bit, then in cmd (as Admin) put
bcdedit /set IncreaseUserVa 3072
- Install masm32;
- Open cmd (as administrator too);
- Put
cd C:QtToolsmingw492_32libexecgcci686-w64-mingw324.9.2
- Put
C:masm32bineditbin.exe /LARGEADDRESSAWARE cc1plus.exe
That’s all.
answered Oct 14, 2016 at 11:52
RinatRinat
1,9412 gold badges16 silver badges26 bronze badges
1
Don’t forget the obvious either: The message might actually be true and you really don’t have enough memory, or the memory can’t be made available for the process that needs it.
I’ve got 16GB of RAM on my system which ought to be plenty for my small application. «It can’t possibly be that.» I thought… but my machine hadn’t been restarted in weeks.
A system restart is all it took to fix this error for me.
answered Sep 13, 2021 at 14:53
M_MM_M
1,9352 gold badges17 silver badges22 bronze badges
Загрузка…
The browser version you are using is not recommended for this site.
Please consider upgrading to the latest version of your browser by clicking one of the following links.
- Safari
- Chrome
- Edge
- Firefox
Article ID: 000086946
Content Type: Troubleshooting
Last Reviewed: 10/06/2016
cc1plus.exe: out of memory allocating 65536 bytes
Environment
Bug ID: FB: 405528;
Version Found: 13.0
Version Fixed: 17.0
This error may be seen when compiling large software projects on Windows platforms. cc1plus.exe is a 32bit Windows application and has access to 2GB of memory on Windows.
To work around this problem, Windows can be configured to allow 32bit applications access to a 3GB address space.
1. Enable 3GB address space for 32bit applications on Windows:
From Windows command prompt run: bcdedit /set IncreaseUserVa 3072
2. Allow cc1plus.exe to use the larger address space
From Windows command prompt run: editbin /LARGEADDRESSAWARE «<path>/cc1plus.exe“
This problem is scheduled to be fixed in a future release of the SoC EDS Software.
- Description
- Resolution
Need more help?
Select Your Region
Sign In to access restricted content
Using Intel.com Search
You can easily search the entire Intel.com site in several ways.
-
Brand Name:
Core i9
-
Document Number:
123456
-
Code Name:
Alder Lake
-
Special Operators:
“Ice Lake”, Ice AND Lake, Ice OR Lake, Ice*
Quick Links
You can also try the quick links below to see results for most popular searches.
-
Product Information
- Support
-
Drivers & Software
Recent Searches
Sign In to access restricted content
Advanced Search
Only search in
Title
Description
Content ID
restricted content.
The browser version you are using is not recommended for this site.
Please consider upgrading to the latest version of your browser by clicking one of the following links.
- Safari
- Chrome
- Edge
- Firefox
Article ID: 000086946
Content Type: Troubleshooting
Last Reviewed: 10/06/2016
cc1plus.exe: out of memory allocating 65536 bytes
Environment
Bug ID: FB: 405528;
Version Found: 13.0
Version Fixed: 17.0
This error may be seen when compiling large software projects on Windows platforms. cc1plus.exe is a 32bit Windows application and has access to 2GB of memory on Windows.
To work around this problem, Windows can be configured to allow 32bit applications access to a 3GB address space.
1. Enable 3GB address space for 32bit applications on Windows:
From Windows command prompt run: bcdedit /set IncreaseUserVa 3072
2. Allow cc1plus.exe to use the larger address space
From Windows command prompt run: editbin /LARGEADDRESSAWARE «<path>/cc1plus.exe“
This problem is scheduled to be fixed in a future release of the SoC EDS Software.
- Description
- Resolution