in reply to fork on linux 2.6 does not share memory

It does share memory, using copy-on-write. However, this sharing was not reported accurately in the 2.4 kernel and is basically not reported at all in 2.6. You'll have to look at something else, like how much total physical RAM is being used after each process forks, to determine how much sharing is happening. There was a thread about this on the mod_perl mailing list.
  • Comment on Re: fork on linux 2.6 does not share memory

Replies are listed 'Best First'.
Re^2: fork on linux 2.6 does not share memory
by tinita (Parson) on Jul 26, 2005 at 14:55 UTC
    ok, thanks for the link.
    i actually looked also at the free memory my system reported (with free or xosview), and there I saw that the double size was used. i'll look at that in detail to assure that i looked correctly.

    Update: Ok, now that I checked with a qx{free} directly in the script I saw that the memory size didn't double. *phooey* thanks again. don't know at what I was looking before.

    Unfortunately that means I can dump Apache::SizeLimit. Maybe I can at least use MAX_PROCESS_SIZE instead of MAX_UNSHARED_SIZE. bummer.