RE: Is it Event.pm or me that's loosing its memory?
[email protected] ("Bradley Brahms") Sat, 11 May 2002 19:30:24 -0400
| Newsgroups | perl.loop |
|---|---|
| Message-ID | <[email protected]> |
FYI, as I have mentioned before I have tried the script with various combinations of perl/malloc on Solaris 7. I have now tried the same script on Linux with the following configurations: Linux 2.2.13-4 gcc 2.91.66 Event.pm 0.85 perl 5.005_03 and perl 5.6.1 The growth happens in both versions of perl. Brad -----Original Message----- From: Joshua N Pritikin [mailto:[email protected]] Sent: Saturday, May 11, 2002 12:17 AM To: [email protected] Cc: [email protected] Subject: Re: Is it Event.pm or me that's loosing its memory? 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