Consult sv.c about the arenas. This is where everything perl manages is managed. You'll write some C which can be used by the visit() function. That function can find your SV heads where SvANY() == your pointer. I'd guess you'd zero the refcount and call sv_clear on it then. I've included a copy of a simple function that uses visit() just so you can see how short and easy this can be.
visit(do_report_used, 0, 0); static void do_report_used(pTHX_ SV *sv) { if (SvTYPE(sv) != SVTYPEMASK) { PerlIO_printf(Perl_debug_log, "****\n"); sv_dump(sv); } }
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re: Is it possible to obtain all hardreferences to some memory address by knowing only one of them?
by diotalevi
in thread Is it possible to obtain all hardreferences to some memory address by knowing only one of them?
by toapole
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |