Couldn’t reserve space for cygwin’s heap, Win32 error 0

Cygwin and Windows git stopped playing nicely together after a recent Windows update. There’s a variety of recommendations for how to fix this this on StackOverflow and elsewhere, but this post actually makes the most sense. In a nutshell, msys-1.0.dll (installed into your Program Files\Git\bin directory) is not built to be position independent. Use the dll rebaser to get it to load at a new address, like so:

$ rebase.exe -b 0x50000000 msys-1.0.dll

And voila, git goodness restored.

Tags: ,

1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)

9 Responses to “Couldn’t reserve space for cygwin’s heap, Win32 error 0”

  1. Dani Ramírez Says:

    I saw this solution in SO but it failed. Well… *I* failed. I tried several different solutions and this seemed to be the most reliable.

    Just for those who see how rebase keeps failing: admin console, n00bs 😛 I totally forgot this and lost a couple of hours trying other solutions.

    Thanks for the confirmation for the method!

  2. naveen Says:

    Thanks. This worked for me! Cheers.

  3. Amadren Says:

    Thanks :)

  4. stxh Says:

    You save me

  5. Rick Boatright Says:

    thank Ghu. First google result and it just worked. Good stuff!

  6. Rick Boatright Says:

    If you’re getting this when running git powershell after installing github, do the rebase from the git powershell, or bring up console in administrator mode, don’t just run cmd, it won’t work.

    also, if you’re doing this from an installed windows github, you’ll be wanting the msys-1.dll in \users\yourname\local\github\PortableGitblahblahblah\bin just to save you the joy of looking for it.

  7. Mike Says:

    Worked for me in admin console. Thanx!!!

  8. BlackBeard Says:

    AWESOME solution!!! This works for me! Many thanks.

  9. RambleC Says:

    Admin console worked. Thanks a million: this has been a serious PITA for a while now.

Leave a Reply