No, as you say, you're using it pretty much as documented. Probably the best thing to do will be to keep the interpreter hanging around, and call perl_eval_ev() more than once - so in your loop, you get rid of the perl_construct/destruct, and put them outside the loop. That way, the memory you leak is constant, rather than proportional to the number of times you have looped. Not a fix, but a solution nonetheles...
| [reply] |
Hi kal,
first: thanks for your efforts!
I tried this and the leak became invisible. But then I found that
if you'd take away the sleep(1) it still grows.
As a matter of fact: with the perl interpreter intitialising stuffed into main
it grows only every 30 calls or something like that -> ?!?!
Just to be sure I removed the call_perl()-statement from the loop and it didn't leak...
| [reply] [d/l] [select] |
Just a stab in the dark but why not fork a child to do you loop? After you are down with the loop the child ends and should not the memory be reclaimed?
------ The Price of Freedom is Eternal Vigilance
| [reply] |