in reply to Re^2: Lots of memory usage with fork&copy
in thread Lots of memory usage with fork&copy

FYI: The use of a fileshare and File::Copy are both incidental to the problem. The following one-liner demonstrates the memory growth under both 5.8.8 and 5.9.5.

The second one-liner also demonstrates that use Win32; definitely has the effect of slowing the growth rate:

## leaks rapidly. The sleep just avoids a fork bomb. \as817\perl\bin\perl.exe -le"while(Win32::Sleep 10){$p=fork and waitpi +d($p,0) or print(qq[kid:$$]),exit}" ## This leaks more slowly \as817\perl\bin\perl.exe -mWin32 -le"while(Win32::Sleep 10){$p=fork an +d waitpid($p,0) or print(qq[kid:$$]),exit}"

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.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^4: Lots of memory usage with fork&copy
by andreidf (Novice) on Apr 27, 2007 at 18:20 UTC
    With waitpid (used in that form) you won't create a fork bomb so there's no need for sleep. I'll test on monday with an older perl if I'll found an installation kit on the internet.