This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cygwin Maximum Memory Documentation


I've found the following to be true on my system and feel these details could usefully be added to the Changing Cygwin's Maximum Memory page in the User's Guide. My system is a Dell Inspiron 1520 laptop with 4GB of physical RAM running Windows XP Home Edition with SP3. Uname -v reports the Cygwin Kernel version as 2010-04-07 11:02 Some of these comments are specific to XP; I gather Vista does not use a boot.ini file, for example. Perhaps others running other operating systems could flesh it out to provide complete documentation across operating systems.

1) When changing the maximum memory available to Cygwin using "regtool -i set /HKLM/Software/Cygwin/heap_chunk_in_mb MMMM" the maximum useful value of MMMM is 4095. Values of 4096 and above result in the heap size reverting to its unset value (about 1000 on my system).

2) With this change in place processes are still limited to 2GB of memory on 32-bit Windows systems, unless you set the /3GB switch in your boot.ini file. This switch allows each process to grow to 3GB. However, used alone it may have undesirable consequences (such as your system hanging) which the /Userva=MMMM flag may prevent. MMMM from 2900 to 3030 is recommended. This switch caps user processes at MMMM MB.

The change might be from a boot.ini file of

[boot loader]
;timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect


to

[boot loader]
;timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Home Edition 2.83GB" /3GB /Userva=2900 /noexecute=optin /fastdetect


You should then get a choice between OS configurations at boot. If you use a 3rd party boot loader you may have to make the configuration changes there instead of directly to the boot.ini file.

3) With both these changes in place your process will STILL be limited to 2GB process size, unless you compile it with the /LARGEADDRESSAWARE linker flag in place. Under gcc this flag is specified thus : gcc -Wl,--large-address-aware -o program.x program.c That's W ell, not W one.


With all these changes in place I can now run gcc compiled Cygwin processes up to 2.83GB in size :)


/rob


-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]