This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Possible cause of WaitForMultipleObjects error message
- To: jazz at softway dot com
- Subject: Re: Possible cause of WaitForMultipleObjects error message
- From: Chris Faylor <cgf at bbc dot com>
- Date: Sun, 16 Nov 1997 14:06:56 -0500 (EST)
- Cc: gnu-win32 at cygnus dot com
>> 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
"gnu-win32-request@cygnus.com" with one line of text: "help".