Skip to main content
ABELA
Associate II
Aug 17, 2019 5:09 PM UTC
Solved

Compilation error: "*** Couldn't reserve space for cygwin's heap, Win32 error 0"

Compilation of any project almost always ends with this post. If you run the compilation several times, sometimes success comes. Basically, an error occurs when compiling images. What can I configure to avoid this error?

   0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487

AllocationBase 0x0, BaseAddress 0x60EA0000, RegionSize 0x200000, State 0x10000

C:\TouchGFX\4.10.0\env\MinGW\msys\1.0\bin\echo.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0

simulator/gcc/Makefile:238: recipe for target 'BitmapDatabase' failed

make[1]: *** [BitmapDatabase] Error 1

simulator/gcc/Makefile:32: recipe for target 'all' failed

make: *** [all] Error 2

This topic has been closed for replies.

11 replies

Tesla DeLorean
Guru
Aug 17, 2019 5:25 PM UTC
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ABELA
ABELAAuthor
Associate II
Aug 17, 2019 10:25 PM UTC

I completely re-installed the whole package TouchGFX twice. Same troubles.

Tesla DeLorean
Guru
Aug 19, 2019 1:18 PM UTC

Well clearly not an installation issue. Did you REBASE the DLL?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Pavel A.Best answer
Aug 18, 2019 9:08 AM UTC
Martin KJELDSEN
Principal III
Aug 19, 2019 11:31 AM UTC

Hi,

As @Pavel A.​ says it's an issue with msys. The trick is usually to change the order in which you have the folders that include msys.dll on your path, as far as i remember.

/Martin

Tesla DeLorean
Guru
Aug 19, 2019 1:17 PM UTC

The more prevalent advice is to REBASE the DLL on x64 systems

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ABELA
ABELAAuthor
Associate II
Aug 19, 2019 7:31 PM UTC

How to make it? Now in my system dont have any rebase.exe.

Try to install winGit 64?

ABELA
ABELAAuthor
Associate II
Aug 20, 2019 8:32 AM UTC

The problem is gone.

REBASE method is working. I used MS Studio editbin.exe.

“C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\editbin�? /rebase:base=0x50000000 msys-1.0.dll

Martin KJELDSEN
Principal III
Aug 20, 2019 8:45 AM UTC

That's greatm @ABELA​!

Visitor II
Jun 18, 2024 2:00 PM UTC

Hi All,

 

I see that a solution here is rebasing a dll. However we did not want to do that for several reasons.

On further investigation, we are building on Windows 11, it appears that Windows Defender was the cause, using a mechanism called "Force Randomisation mechanism for Images", also known as ASLR

To fix this we needed to run PowerShell as Administrator and then run the following two commands

Be sure to change the path to match your own installation.

 

Get-ChildItem -Recurse -Path "C:\TouchGFX\4.24.0\env\MinGW\msys\1.0\bin\*.exe" | Foreach-Object -Process { Set-ProcessMitigation -Name $_.Name -Disable ForceRelocateImages

 

Get-ChildItem -Recurse -Path "C:\TouchGFX\4.24.0\env\MinGW\msys\1.0\bin\*.exe" | Foreach-Object -Process { Set-ProcessMitigation -Name $_.Name -Disable BottomUp }

 

The result of this is that the ASLR process is disabled for the specific executables contained within the sensitive directory, leaving the rest of the system protected.