in reply to Strawberry perl memory leak
Suitably adjusted to run under 5.8.x, I see the same behaviour (continuous memory growth) under both AS811/5.8.6 and AS1002/5.10. The memory growth is much faster with 5.10. After 100 forks, 5.8.6 is consuming 120MB. At the same point 5.10 is consuming 260MB.
I suspect that the root cause is that the old threads are not being joined until the loop is completed, so that the old thread carcasses (stack and heap allocations) are just accumulating in memory (much like *nix zombies), until their return values are either collected or discarded with join or detach, and that isn't done until the wait_for_all method is called.
Speculation, but it fits the symptoms.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Strawberry perl memory leak
by EvanCarroll (Chaplain) on May 15, 2008 at 17:24 UTC | |
by BrowserUk (Patriarch) on May 15, 2008 at 18:20 UTC |