http://qs321.pair.com?node_id=11141026


in reply to Perl forked processes and variable sharing

I didn't look at your code and description in depth, but are you aware that in a virtual memory system, (every major UNIXy OS in the last 25 years), a forked child and its parents have separate memories? i.e. if the parent writes to a byte at address 0x10000, that change will not appear in the child's address 0x10000, since those two (identical) virtual addresses map to different physical addresses.

The slight exception is Windows, where perl emulates a fork by using two threads sharing the same virtual address space.

Dave.