This has been in the code since year dot, and no-one has spotted that the
returned sizes have been under-reporting.
Revision history for Perl extension Devel::Size.
-0.74_51 2011-04-20 nicholas
+0.74_51 2011-04-22 nicholas
* Don't count PL_sv_{undef,no,yes} in the size returned
* total_size() was double-counting entries in typeglobs
* sv_size() was double-counting the PVGV size if GvEGV() looped back
+ * fix classic off-by-one error - the answer is strlen() + 1, not just strlen()
0.74_50 2011-04-19 nicholas
* Ensure that size() doesn't add the referent's size for non SVt_RV references
static void
check_new_and_strlen(struct state *st, const char *const p) {
if(check_new(st, p))
- st->total_size += strlen(p);
+ st->total_size += 1 + strlen(p);
}
static void