⭐ in reply to How do I find the memory used by a particular hash (NOT including perl itself)?
Use the Devel::Size module.
For example, to determine the amount of memory in bytes used by a hash named %hash:
use Devel::Size qw(total_size); my $memory_used = total_size(\%hash);
If the hash contains any references to other variables, the memory those variables use will be added as well.
|
|---|