Couldn't reserve space for cygwin's heap


アトラシアン コミュニティをご利用ください。


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く



After pushing to Stash results in the following intermittent error on Git clients:

H:\> git push
Counting objects: 10, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (10/10), 1.31 KiB | 0 bytes/s, done.
Total 10 (delta 4), reused 0 (delta 0)
remote: 0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
remote: AllocationBase 0x0, BaseAddress 0x68570000, RegionSize 0x300000, State 0x10000
remote: D:\Sysdata\Git\bin\env.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
To ssh://
! [remote rejected] project/composer_nov_2015/dev -> project/composer_nov_2015/dev (pre-receive hook declined)
error: failed to push some refs to 'ssh://'


The full explanation for such issue can be found on this Stackoverflow answer.

It's Cygwin code failing to allocate a ~5 MB large chunk of memory for its heap at this fixed address 0x68570000, while only a hole ~2.5 MB large was apparently available there. The relevant code can be seen in msysgit source.


Both current Cygwin and the new version of MSYS - MSYS2 - already have different logic in place, which is hopefully more robust. It's only old versions of Git for Windows which have been still built using the old broken MSYS system.


  • Install Git for Windows 2 - it is built with the new, properly maintained MSYS2 and also has many new features, plenty of bug fixes and so on. There is also a 64-bit version available which would lower the chance of address space clashes considerably even if this problem was not fixed.
  • On our Supported Platforms we outline the Git versions that should work well with your environment.
最終更新日: 2016 年 2 月 26 日


Powered by Confluence and Scroll Viewport.