in reply to Re^25: Strange memory leak using just threads (forks.pm)
in thread Strange memory leak using just threads

because fixing this properly with |= chr(1) doesn't cause any significant runtime difference

Hm. Seems strange. Without the fix, there should be no changes made to the COW memory. With it, should cause 125 * 4096 pages * 100 forks to be replicated.

It's not a huge amount, but I'd expect to see some difference unless there is some other reason for it not to happen.

Guess I'll just have to reinstall my *nix VM.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy
  • Comment on Re^26: Strange memory leak using just threads (forks.pm)

Replies are listed 'Best First'.
Re^27: Strange memory leak using just threads (forks.pm)
by Anonymous Monk on Sep 24, 2010 at 00:41 UTC
    ...there should be no changes made to the COW memory
    Why not? Both versions modify the string - just differently:

    $ perl -le '$data = "xxx"; substr($data, 1, 1) |= 1; print $data' x1x $ perl -le '$data = "xxx"; substr($data, 1, 1) |= chr(1); print $data' xyx