Skip to main content
ABELA
Associate II
August 17, 2019
Solved

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

  • August 17, 2019
  • 6 replies
  • 9312 views

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

6 replies

Tesla DeLorean
Guru
August 17, 2019
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
ABELA
ABELAAuthor
Associate II
August 17, 2019

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

Tesla DeLorean
Guru
August 19, 2019

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

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Pavel A.
Pavel A.Best answer
Super User
August 18, 2019
Martin KJELDSEN
Principal III
August 19, 2019

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
August 19, 2019

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

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
ABELA
ABELAAuthor
Associate II
August 19, 2019

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

Try to install winGit 64?

ABELA
ABELAAuthor
Associate II
August 20, 2019

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
August 20, 2019

That's greatm @ABELA​!

Visitor II
June 18, 2024

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.