in reply to Memory management with long running scripts
I looked at Event:
* $event->remove This removes an event object from the event-loop. Note that the object itself is not destroyed and freed. It is merely disabled and you can later re-enable it by calling $event->add.Maybe there is an issue with how these Event's are handled?
(4) Can the use of eval() cause this sort of issue?
I'm not sure how you are using eval. If you are eval'ing some ever increasing thing - that would take more memory.
(3) Is there a fundamental difference in how perl allocates memory for anonymous arrays/hashes vs @arrays and %hashes? (ie stack vs heap?) that would affect memory management?
To my knowledge no. Perl does not "free" memory back to the OS, once it has it, it is not returned. There is a big difference in allowing Perl to reuse the memory that it already has for itself (e.g. "destroying Perl objects, etc).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Memory management with long running scripts
by bulk88 (Priest) on Jul 21, 2012 at 20:33 UTC | |
by Marshall (Canon) on Jul 21, 2012 at 23:13 UTC | |
by AnomalousMonk (Archbishop) on Jul 21, 2012 at 23:44 UTC | |
by BrowserUk (Patriarch) on Jul 22, 2012 at 01:34 UTC | |
by AnomalousMonk (Archbishop) on Jul 22, 2012 at 01:45 UTC | |
by bulk88 (Priest) on Jul 22, 2012 at 00:36 UTC | |
by AnomalousMonk (Archbishop) on Jul 22, 2012 at 01:33 UTC |