From: Florian Ragwitz Date: Mon, 1 Oct 2012 09:22:13 +0000 (+0900) Subject: Count all stack frames, not just the used ones X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b42bdc953076ff37373daa19f77f77d8b14f0287;p=p5sagit%2FDevel-Size.git Count all stack frames, not just the used ones --- diff --git a/Memory.xs b/Memory.xs index c392dca..ce6017c 100644 --- a/Memory.xs +++ b/Memory.xs @@ -1467,9 +1467,9 @@ parser_size(pTHX_ struct state *const st, pPATH, yy_parser *parser) yy_stack_frame *ps; //warn("total: %u", parser->stack_size); //warn("foo: %u", parser->ps - parser->stack); + ADD_SIZE(st, "stack_frames", parser->stack_size * sizeof(yy_stack_frame)); for (ps = parser->stack; ps <= parser->ps; ps++) { ADD_PRE_ATTR(st, 0, "frame", ps - parser->ps); - ADD_SIZE(st, "yy_stack_frame", sizeof(yy_stack_frame)); sv_size(aTHX_ st, NPathLink("compcv"), (SV*)ps->compcv, TOTAL_SIZE_RECURSION); } NPathPopNode;