Re: Is it Event.pm or me that's loosing its memory?
[email protected] (Joshua N Pritikin) Sat, 11 May 2002 09:47:12 +0530
| Newsgroups | perl.loop |
|---|---|
| Message-ID | <[email protected]> |
On Fri, May 10, 2002 at 07:53:11PM +0000, [email protected] wrote: > I have confirmed that even a Event->timer will grow the > stack on and on and on. i can reproduce the problem on my machine with perl 5.6.1. If you look at the XS implementation of _loop(), you will see that i call ENTER/SAVETMPS FREETMPS/LEAVE for each dispatch. This should take care of any temporary memory allocated in the callback ... unless there is a reference counting problem. You can try adding SvREFCNT_dec or sv_2mortal if you suspect that an SV isn't getting free'd. We should probably check the behavior with 5.6.0 and earlier -- it might be a bug in perl or some subtle change in the API. -- Victory to the Divine Mother!! after all, http://sahajayoga.org http://why-compete.org