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.

9 thoughts on “Couldn’t reserve space for cygwin’s heap, Win32 error 0

  1. 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. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.