The cygheap saga

Christopher Faylor
Sun Apr 4 04:13:00 GMT 2004

On Sat, Apr 03, 2004 at 10:39:00PM -0500, Pierre A. Humblet wrote:
>At 10:01 PM 4/3/2004 -0500, Christopher Faylor wrote:
>>You keep decrementing from alloc_sz until you hit cygheap_max then you punt.
>... and after each decrement you call VirtualAlloc
>Isn't it better finding out in one shot how much you can get?

Yes.  So, generalize a routine and use it in the parent and the child.
I don't see why you need to pass in more information.  If you can't reserve
"alloc_sz" (hmm.  That's improperly named) then you get as much as you can.
If it isn't as big as the minimum, then punt.

Another thing that we could do on NT is to have the parent call
VirtualAllocEx to set aside the space required in the child so that no
DLLs will load into it.

>>No, it's not for this weekend.  Brian Ford only asked for some
>>debugging of the problem *yesterday*.
>>Thanks, Brian, btw.
>One suggestion: Try calling GetModuleFileName to find out where the
>interferer is coming from.

Brian suggested using "info dll".  That will tell us.

I did increase the reserved size of the cygheap a while ago.  Maybe it
wasn't such a good idea.  Just putting it back to previous levels would
probably solve this symptom.  I am really curious what DLL is causing
this problem, though.


More information about the Cygwin-developers mailing list