Mail Archives: cygwin/2007/05/11/13:51:08
What explains this peculiar behavior of max_memory and heap_chunk_in_mb?
Following the instructions at:
http://www.cygwin.com/cygwin-ug-net/setup-maxmem.html, I increased
Cygwin's memory limit to 1024MB:
$ regtool -i set /HKLM/Software/Cygnus\ Solutions/Cygwin/heap_chunk_in_mb 1024
and after closing all Cygwin programs, and restarting, then I see:
$ $ ./max_memory.exe
3fffe000 bytes (1024.0Mb)
Makes sense so far. Curious what the default limit on my system is, I
unset the limit and tried again:
$ regtool unset /HKLM/Software/Cygnus\ Solutions/Cygwin/heap_chunk_in_mb
$ regtool -v list /HKLM/Software/Cygnus\ Solutions/Cygwin
mounts v2\ (Cygwin)
Program Options\ (cygnus)
After closing and restarting:
$ ./max_memory.exe
5fffe000 bytes (1536.0Mb)
Huh? The documentation says the default limit is 384MB. Okay, maybe
the documentation is wrong, so I tried setting the limit to 384MB.
$ regtool -i set /HKLM/Software/Cygnus\ Solutions/Cygwin/heap_chunk_in_mb 384
$ regtool -v list /HKLM/Software/Cygnus\ Solutions/Cygwin
mounts v2\ (Cygwin)
Program Options\ (cygnus)
heap_chunk_in_mb = 0x00000180 (384)
And after quitting and restarting:
$ ./max_memory.exe
5fffe000 bytes (1536.0Mb)
Now something is fishy for sure. The good news is that when I set the
limit to 2048, the program I'm really trying to run works. I'd like
to understand why the max_memory test is reporting strange results,
though.
Matt
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -