At 8:33 PM +0100 7/16/03, David Cantrell wrote:OK, I'm curious; how _would_ one go about testing this?As far as the program is concerned, it's a complete copy. But yes, most modern virtual memory implementations will, I believe, do copy on write. I haven't actually tested this on OS X though :-)
Generate a really big data structure in memory. fork(). sleep for a bit so you can see how much memory is used. Now in one of the processes, change all the data. sleep some more so you have time to see how much memory is used.
Not very elegant, I'll admit ;-)
-- David Cantrell