[perl #42105] memory leak in PCCMETHOD together with Parrot_runops_fromc

0 views
Skip to first unread message

Richard Hundt

unread,
Mar 26, 2007, 7:52:16 PM3/26/07
to bugs-bi...@rt.perl.org
# New Ticket Created by "Richard Hundt"
# Please include the string: [perl #42105]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42105 >


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

pccmethod_runops_leak_test.diff
Reply all
Reply to author
Forward
0 new messages