X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Size.xs;h=2d0fc53b76f3c3c67a8bf627a26a81bd93dad6ab;hb=78037efb12f431d87eb4f21faead41323add6ef9;hp=e72731e8b2ad1ce23004bd32215d186ad8891c03;hpb=15588e9c7fb70244a5b163691b76b39ae42d7550;p=p5sagit%2FDevel-Size.git diff --git a/Size.xs b/Size.xs index e72731e..2d0fc53 100644 --- a/Size.xs +++ b/Size.xs @@ -741,6 +741,30 @@ sv_size(pTHX_ struct state *const st, const SV * const orig_thing, } } } +#ifdef HvAUX + if (SvOOK(thing)) { + /* This direct access is arguably "naughty": */ + struct mro_meta *meta = HvAUX(thing)->xhv_mro_meta; + st->total_size += sizeof(struct xpvhv_aux); + hek_size(aTHX_ st, HvNAME_HEK(thing), 1); + if (meta) { + st->total_size += sizeof(struct mro_meta); + sv_size(aTHX_ st, (SV *)meta->mro_nextmethod, TOTAL_SIZE_RECURSION); +#if PERL_VERSION > 10 || (PERL_VERSION == 10 && PERL_SUBVERSION > 0) + sv_size(aTHX_ st, (SV *)meta->isa, TOTAL_SIZE_RECURSION); +#endif +#if PERL_VERSION > 10 + sv_size(aTHX_ st, (SV *)meta->mro_linear_all, TOTAL_SIZE_RECURSION); + sv_size(aTHX_ st, meta->mro_linear_current, TOTAL_SIZE_RECURSION); +#else + sv_size(aTHX_ st, (SV *)meta->mro_linear_dfs, TOTAL_SIZE_RECURSION); + sv_size(aTHX_ st, (SV *)meta->mro_linear_c3, TOTAL_SIZE_RECURSION); +#endif + } + } +#else + check_new_and_strlen(st, HvNAME_get(thing)); +#endif TAG;break; @@ -794,7 +818,11 @@ sv_size(pTHX_ struct state *const st, const SV * const orig_thing, case SVt_PVGV: TAG; if(isGV_with_GP(thing)) { +#ifdef GvNAME_HEK + hek_size(aTHX_ st, GvNAME_HEK(thing), 1); +#else st->total_size += GvNAMELEN(thing); +#endif #ifdef GvFILE_HEK hek_size(aTHX_ st, GvFILE_HEK(thing), 1); #elif defined(GvFILE)