This is the mail archive of the
mailing list for the Cygwin project.
Re: Documenting heap_chunk_in_mb
- From: Randall R Schulz <rrschulz at cris dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 14 Jan 2002 15:58:37 -0800
- Subject: Re: Documenting heap_chunk_in_mb
Not at all. I don't give up easily, and I definitely found out what I
needed to know and the registry setting worked as it was supposed to. In
fact, the message you found was not about me having trouble increasing the
Cygwin heap allocation, but rather about my need for help in adding the
information to the Cygwin documents.
I needed to increase the memory allocation to be able to run significant
XSB programs (XSB is a Prolog interpreter: <http://xsb.sourceforge.net/>,
if you're interested. Actually, now that I think of it, the memory increase
was not for XSB itself, but was necessary to allow full gcc optimization of
one of the XSB C-language source modules that contains a very large switch
I did not, however, get any answers about the mechanics of the
documentation process, so my offer to help fill in this particular lacuna
went essentially unclaimed.
So it goes...
At 15:44 2002-01-14, you wrote:
>I saw that you were twisting in the wind with setting the registry setting.
>I found out how, so I thought I would share.
>In older releases, such as b19, the registery setting was
>a DWORD setting called HKEY_CURRENT_USER/Software/Cygnus
>Solutions/CYGWIN.DLL setup/b15.0/heap_chunk_in_mb, in the 1.3.3 release of
>cygwin, it is called HKEY_CURRENT_USER/Software/Cygnus
>If you set a value of 4 in cygwin 1.3.3, quit out of all cygwin tools, and
>then launch bash, it will give an error but otherwise start up, indicating
>you are changing the right registry setting. You can then modify it to
>what value you want, pick a value no less than 160, but no greater than
>around 1300. I'm on NT 4.0.
>Hopefully, someone will document this, if it isn't already. I just
>checked, and I don't see any documentation.
>For completeness, why, why would someone need to use this? Many cygwin's
>have a limitation of how much heap they can use before malloc will
>fail. Older releases will complain with commit_and_inc: VirtualAlloc
>failed type messages. Newer releases won't say much, but the application
>will usually complain about being out of memory. Over the years, people
>have just bumped up the base amount of memory that cygwin will reserve for
>heap allocations (see shared.cc, around heap_chunk_in_mb) without fixing
>the `real' problem. Current sources just `fix' the heap at
>256MB. Slightly older cygwin's just allocated 128MB of heap. If a user
>needs more, then they either have to have a fixed cygwin1.dll, or set the
>registry setting. A better long term fix would be to alter the
>malloc/sbrk implementation for cygwin to be able to use multiple chunks of
>address space and then allocate them on demand.
>The more stack space people reserve to their cygwin applications, the less
>space that is available for heap.
>Hope this information helps.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html