c:\test>perl -le"++$n for 1..1e2; system qq[tasklist /nh /fi \"pid eq
+$$\"] "
perl.exe 7500 Console 1 5
+,716 K
c:\test>perl -le"++$n for 1..1e3; system qq[tasklist /nh /fi \"pid eq
+$$\"] "
perl.exe 3676 Console 1 5
+,712 K
c:\test>perl -le"++$n for 1..1e4; system qq[tasklist /nh /fi \"pid eq
+$$\"] "
perl.exe 6048 Console 1 5
+,732 K
c:\test>perl -le"++$n for 1..1e5; system qq[tasklist /nh /fi \"pid eq
+$$\"] "
perl.exe 5648 Console 1 5
+,720 K
c:\test>perl -le"++$n for 1..1e6; system qq[tasklist /nh /fi \"pid eq
+$$\"] "
perl.exe 8620 Console 1 5
+,736 K
Whilst the memory usage varies a little, it sometime goes down a few k when the notional size of this array increases by an order of magnitude?
Conversely, if you explicitly create an array of that size, the memory requirement increases by 100MB as expected: c:\test>perl -le"@a = 1 .. 1e6; system qq[tasklist /nh /fi \"pid eq $$
+\"] "
perl.exe 2664 Console 1 109
+,576 K
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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".
|