This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Semantics of fork() wrt windows heaps?


Hi all,

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 themselves.

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.

Thoughts?
Ryan



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]