Semantics of fork() wrt windows heaps?
Tue Apr 26 13:25:00 GMT 2011
Analyzing process address space layouts, I've noticed that the windows
heaps don't usually end up in the same place for the parent and child,
and some processes create and use heaps besides the default process
heap. Emacs, for example, has 9 active heaps out of the box (no .emacs
file); I suspect some of the many dlls it loads create private heaps for
I assume (hope?) that cygwin doesn't actually use these heaps directly,
but is there still a risk that these structures could cause problems in
a child which doesn't exec()? Even if the dll never exposed
internally-allocated memory to the outside world, it seems like the
.bss/.data sections copied from the parent could easily reference some
heap which moved or no longer exists...
The same goes for other "private" memory allocations which don't belong
to any heap.
More information about the Cygwin-developers