X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Size.xs;h=05e540a99d4731580fe84ed74246c3367eedd08e;hb=697012cd88aeaccae5f96e1efa8feed731ed53bf;hp=6f7d0fb9302bad7a9b694ba85e5c25fa9c69a684;hpb=5a706444d26c2d6694a7244a812d2e387a219aa0;p=p5sagit%2FDevel-Size.git diff --git a/Size.xs b/Size.xs index 6f7d0fb..05e540a 100644 --- a/Size.xs +++ b/Size.xs @@ -518,8 +518,16 @@ op_size(pTHX_ const OP * const baseop, struct state *st) #endif #ifdef USE_ITHREADS check_new_and_strlen(st, basecop->cop_file); +#if PERL_VERSION < 17 || (PERL_VERSION == 17 && PERL_SUBVERSION == 0) + /* This pointer is owned by the COP, and freed with it. */ check_new_and_strlen(st, basecop->cop_stashpv); #else + /* A per-interpreter pointer for this stash is allocated in + PL_stashpad. */ + if (check_new(st, PL_stashpad + basecop->cop_stashoff)) + st->total_size += sizeof(PL_stashpad[basecop->cop_stashoff]); +#endif +#else sv_size(aTHX_ st, (SV *)basecop->cop_filegv, SOME_RECURSION); #endif