On Tue Mar 27 09:42:00 2007, guest wrote:
> On Mon Mar 26 16:52:16 2007, [EMAIL PROTECTED] wrote:
> > Hi,
> > 
> > The following PMC leaks memory at about 55Mb/1000000 calls to `call()'
> > 
> > #include "parrot/parrot.h"
> > 
> > static INTVAL dynpmc_Foo;
> > 
> > pmclass Foo dynpmc {
> >     void class_init() {
> >         if (pass) {
> >             dynpmc_Foo = Parrot_PMC_typenum(INTERP, "Foo");
> > 
> > }
> >     }
> > 
> > 
> >     void assign_pmc(PMC *sub) {
> >         PMC_pmc_val(SELF) = sub;
> >     }
> > 
> >     PCCMETHOD void call() {
> >         PMC *sub = PMC_pmc_val(SELF);
> >         Parrot_runops_fromc(INTERP, sub);
> > 
> > }
> > }
> > 
> > Cheers,
> > Rich
> 
> 
> as an update to this, I don't think the leak has anything to do with the
>  call to Parrot_runops_fromc as the following snippet of code common to
> what the PCCMETHOD preprocessor spits out leaks memory too:
> 
>     METHOD void call() {
>         PMC *code = PMC_pmc_val(SELF);
>         INTVAL n_regs_used[]     = { 0, 0, 0, 3 };
>         opcode_t param_indexes[] = { 0, 1, 2 };
>         opcode_t *current_args;
>         PMC* _type = pmc_new(interp, enum_class_FixedIntegerArray);
>         PMC* param_sig = Parrot_FixedIntegerArray_new_from_string(
>             interp, _type,
>             string_from_cstring(interp, "(2, 2, 34)", 0),
>             PObj_constant_FLAG
>         );
> 
>         PObj_live_CLEAR(param_sig);
>         PObj_live_CLEAR(_type);
>     }
> 
> So it would seem that perhaps FixedIntegerArray objects are leaking

Is this still an issue? I've never even heard of the "PCCMETHOD
Compiler", does it still exist? Is it used? Is FixedIntegerArray known
to be leaking any memory?

-- 
Andrew Whitworth
a.k.a Whiteknight


Reply via email to