if (AvMAX(thing) != -1) { /* an array with 10 slots has AvMax() set to 9 - te 2007-04-22 */ total_size += sizeof(SV *) * (AvMAX(thing) + 1);