Subject: Re: Possible cause of WaitForMultipleObjects error message
From: [email-masked] (Chris Faylor)

16 Nov 1997 11:31:19 -0800
Message-ID: <[email-masked]>
To: [email-masked]
Cc: [email-masked]

>> Until then, you are mixing metaphors if you are using fork() with
>> Windows memory allocation calls.
>
>Does that mean that if a cygwin app calls a DLL which calls HeapAlloc,
>the app will be unable to fork()?

I haven't studied this in great detail, but, no, this doesn't necessarily
follow.  It does mean that any memory allocated using HeapAlloc will not
be duplicated in the forked process.

The "split heap" is detected by sbrk.  When it attempts to grow the
cygwin heap, it notices if the end of memory is the same as the last
time it was called.  If it isn't, some other function has extended the
*Windows* heap and the *cygwin* heap is marked as split.

So, you will not necessarily receive the split heap error unless you follow
the HeapAlloc with a call to sbrk.  malloc calls sbrk when it is out of
memory.
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".