Cygwin Bash Fatal Error in Windows 64-bit Command Prompt or PuTTYcyg

In Windows 7 RC x64, you will get the following fatal memory allocation error if you launch Cygwin (bash) from the comment prompt:

2 [main] bash 2776 C:\Cygwin\bin\bash.exe: *** fatal error - couldn't allocate heap, Win32 error 487, base 0xF20000, top 0xF90000, reserve_size 454656, allocsize 458752, page_const 4096

This error can be worked around by using x86 (32-bit) version of the command prompt. That is, instead of executing C:\WINDOWS\SYSTEM32\CMD.EXE (the 64-bit binary), you have to execute C:\WINDOWS\SYSWOW64\CMD.EXE (the 32-bit binary).

For example, to launch a bash shell in the command prompt window, you have to execute the following command instead of executing the bash.exe directly:

C:\WINDOWS\SYSWOW64\CMD.EXE /C C:\Cygwin\bin\bash.exe

Actually, you might not have experience this issue if you were using PuTTYcyg version 20090212 or above. I was using an older version cluelessly.

윈도우즈 7 RC x64에서 시그윈 (배쉬쉘) 을 명령행에서 실행하면 다음과 같은 치명적 메모리 할당 에러가 발생합니다:

2 [main] bash 2776 C:\Cygwin\bin\bash.exe: *** fatal error - couldn't allocate heap, Win32 error 487, base 0xF20000, top 0xF90000, reserve_size 454656, allocsize 458752, page_const 4096

이 에러는 명령행의 x86 (32 비트) 버전을 사용해서 해결할 수 있습니다. 즉, C:\WINDOWS\SYSTEM32\CMD.EXE (64 비트 바이너리) 대신 C:\WINDOWS\SYSWOW64\CMD.EXE (32 비트 바이너리) 를 실행하면 됩니다.

예를 들어, 명령행 창에서 배쉬 쉘을 실행하려면, bash.exe 를 직접 실행하는 대신 다음 명령을 실행해야 합니다:

C:\WINDOWS\SYSWOW64\CMD.EXE /C C:\Cygwin\bin\bash.exe

사실 PuTTYcyg 버전 20090212 이상 을 사용하고 계셨다면 이 문제를 전혀 겪지 않으셨을 수도 있습니다. 저는 그것도 모르고 예전 버전을 사용하고 있었거든요.