GitHub Desktop for Windows の Git Shell を起動すると 「Couldn't reserve space for cygwin's heap, Win32 error 0」 って言われる件の対処法
GitHub Desktop for Windows の Git Shell を起動すると、以下のようなエラーが表示されて Git コマンドが使えなくなってしまった。
Windows PowerShell Copyright (C) 2015 Microsoft Corporation. All rights reserved. 0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487 AllocationBase 0x0, BaseAddress 0x68570000, RegionSize 0x200000, State 0x10000 C:\Users\Yu\AppData\Local\GitHub\PortableGit_xxxx\bin\ssh-agent.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0 0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487 AllocationBase 0x0, BaseAddress 0x68570000, RegionSize 0x200000, State 0x10000 C:\Users\Yu\AppData\Local\GitHub\PortableGit_xxxx\bin\ssh-add.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
エラーメッセージでぐぐってみると、対処法が書かれてたエントリがあった。
GitHub Desktop の場合、C:\Users\{UserName}\AppData\Local\GitHub\PortableGit_xxxx\bin
にある msys-1.0.dll
が使われているので、そこに移動して rebase
コマンドを実行すればよい。
C:\Users\Yu\Documents\GitHub> cd C:\Users\Yu\AppData\Local\GitHub\PortableGit_xxxx C:\Users\Yu\AppData\Local\GitHub\PortableGit_xxxx> cd .\bin C:\Users\Yu\AppData\Local\GitHub\PortableGit_xxxx\bin> ls .\msys-1.0.dll ディレクトリ: C:\Users\Yu\AppData\Local\GitHub\PortableGit_xxxx\bin Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 2014/12/19 13:03 777544 msys-1.0.dll C:\Users\Yu\AppData\Local\GitHub\PortableGit_xxxx\bin> rebase -b 0x30000000 msys-1.0.dll
これで直った。