in reply to perl5.10 Devel::Size behaviour changed?

Which version of D::S are you using? This one or this one

And which builds of perl? 32-bit or 64-bit? Both the same? Same platform?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW It is as I've been saying!(Audio until 20090817)
  • Comment on Re: perl5.10 Devel::Size behaviour changed?

Replies are listed 'Best First'.
Re^2: perl5.10 Devel::Size behaviour changed?
by sang1986 (Novice) on Sep 04, 2009 at 10:46 UTC
    It turns out I was using a 64-bit 5.10 and 32-bit 5.8.6. but in some cases I see a more than twice difference between the 2 versions. The 32-bit 5.8.6 gives me 851144. The 64-bit 5.10 gives me this alarming huge number 49563404. Any idea in what cases this could be so?
      take this example. I get 56 with 5.8 32-bit but 176 with 64-bit perl5.10.
      perl -MDevel::Size=total_size -MDevel::Peek -e 'my @a; my $s = total_s +ize(\@a);print "\nSIZE : $s\n"; Dump \@a, 1' SIZE : 56 SV = RV(0x822f26c) at 0x8184a60 REFCNT = 1 FLAGS = (TEMP,ROK) RV = 0x8184b14 SV = PVAV(0x8186c54) at 0x8184b14 REFCNT = 2 FLAGS = (PADBUSY,PADMY) IV = 0 NV = 0 ARRAY = 0x0 FILL = -1 MAX = -1 ARYLEN = 0x0 FLAGS = (REAL)
      with 5.10
      sankaran@invest5.hyd:/u/sankaran/base/src/perl/Deshaw/PDL> /usr/local +/bin/perl5.10 -MDevel::Size=total_size -MDevel::Peek -e 'my @a; my $ +s = total_size(\@a);print "\nSIZE : $s\n"; Dump \@a, 1' SIZE : 176 SV = RV(0x417520) at 0x417510 REFCNT = 1 FLAGS = (TEMP,ROK) RV = 0x4b1ba8 SV = PVAV(0x41a388) at 0x4b1ba8 REFCNT = 2 FLAGS = (PADMY,RMG) MAGIC = 0x57dd10 MG_VIRTUAL = &PL_vtbl_arylen_p MG_TYPE = PERL_MAGIC_arylen_p(@) MG_FLAGS = 0x02 REFCOUNTED ARRAY = 0x0 FILL = -1 MAX = -1 ARYLEN = 0x0 FLAGS = (REAL)

      Again, I ask: which version of Devel::Size are you using?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        I am using 0.71 version http://cpansearch.perl.org/src/TELS/Devel-Size-0.71/lib/Devel/Size.pm
        I'm still stuck without any clue as to how to handle this. :( Any ideas?