Mailing List Archive

Re: memory leak update
: Well, I've been racking my brains and the innards of perl, and I have
: found WHERE the memory is being allocated that is never being
: freed. In the hopes that some kind soul out there can help me to
: figure out why this is happening before I spend all weekend working on
: it, here is the spot.
:
: Given the script, 'eval "1" while 1', perl allocates several chunks of
: memory starting at line 1893 of pp_ctl.c (as of perl5.001m). The
: section of code is:
:
: compcv = (CV*)NEWSV(1104,0);
: sv_upgrade((SV *)compcv, SVt_PVCV);
:
: 1893> comppad = newAV();
: comppad_name = newAV();
: comppad_name_fill = 0;
:
: What I know so far:
:
: A "comppad" is heavily related to, or "is" a stack frame.
:
: Eval *does* need its own stack frame, but why the heck isn't
: it freeing it? Is there some magic where this is supposed to
: get cleaned up after the loop exits (which it never will)?

This is already fixed in my copy. Has been since March. It just never
made it out. I can gen an unofficial patch if you're desperate.

Larry