in reply to Determining size of an IPC::Shareable object
and the code below gives me the footprint of this mini scriptmy $mem1 = `perl -e 'print \`ps h -o sz \$\$\`'`;
Then shouldn't $mem2 - $mem1 = rought overhead of $a ? full test:my $mem2 = `perl -e '\$a = {A=>1, B=>2, C=>3}; print \`ps h -o sz \$\$ +\`'`;
Feel free to say "why don't you use module xy instead ?"... I would much rather do just that :)my $mem1 = `perl -e 'print \`ps h -o sz \$\$\`'`; my $mem2 = `perl -e '\$a = {A=>1, B=>2, C=>3}; print \`ps h -o sz \$\$ +\`'`; print "$mem2 - $mem1 = ". ($mem2 - $mem1) . "\n";
|
|---|