Win32 cygwin's heap error

Running Qt Creator from the Nokia SDK on Windows 7 (64-bit) I got the following error while compiling for a Maemo mobile device: error: Couldn't reserve space for cygwin's heap, Win32 error 0.
After searching I finally found the solution: rebase.exe -b 0x50000000 msys-1.0.dll

This changes the base address of the DLL (the address where it is). Try different addresses for 0x50000000, avoid low addresses (below 0x10000000) and high ones (above 0x70000000). Some addresses might work better with your setup.

When cygwin forks a process it has to place a copy of the heap in the new process at exactly the same address, so it tries to allocate the same block of memory. But you can't guarantee you get that, since DLLs might have been loaded already at that address , or memory might have been allocated by some other DLL that just happens to overlap the requested memory region. If that's the case cygwin displays the error you're getting.

Changing the base address of msys also changes the address where the heap is allocated.

Rebase comes with the windows SDK but instead of downloading the whole SDK from the Microsoft website, you can also get it here: www.tishler.net/jason/software/rebase/.

...

Read more posts by this author.

The Netherlands