On Mon, 2004-08-30 at 14:40, Ozgun Erdogan wrote:
> > > Currently, we're using perl-5.6.1 and are having problems with memory
> > > leaks - thanks to reference counting.
> > 
> > You'll have to break reference loops explicitely.
> 
> If only I had known where those circular references are. I have a
> circular ref. detector tool, but it still doesn't get them. The thing
> is, you could do an SvREFCNT_inc, and boom you have a memory leak.

Ok, you're no longer talking about Perl (the language) but rather about
Perl 5's internals. Different beast.

This is not the right list for debugging that kind of thing, so I won't
go into it, but suffice to say that if you have trouble managing your
references through XS, incorporating Parrot's GC into Perl 5 would be
near impossible. That's not intended as a slight, believe me, I put
myself in the same category (reference counting in Perl 5 is very
difficult to grok from the docs, as the docs make some assumptions about
how much you know about how Perl constructs scopes).

All that aside, Ponie is your friend. As Ponie matures, it will provide
what you need, and your XS could be transitioned over into Parrot
bytecode.

For now, if I were you I would upgrade to 5.8.x and try to make sure
that every value that you move between your XS and Perl is properly
mortal (see the perlapi, perlguts and perlxs man pages).

-- 
â 781-324-3772
â [EMAIL PROTECTED]
â http://www.ajs.com/~ajs

Reply via email to