mirror of https://github.com/Cisco-Talos/clamav
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
428 B
24 lines
428 B
![]()
16 years ago
|
#!/usr/bin/perl
|
||
|
use strict;
|
||
|
use warnings;
|
||
|
|
||
|
my %reallocs;
|
||
|
my %mallocs;
|
||
|
while (<>) {
|
||
|
if (/realloc @ 0x([0-9a-f]+)/) {
|
||
|
$reallocs{$1}="";
|
||
|
}
|
||
|
if (/malloc 0x([0-9a-f]+) size ([0-9]+)/) {
|
||
|
$mallocs{$1}=$2;
|
||
|
}
|
||
|
}
|
||
|
my %sizes;
|
||
|
while (my ($address, $size) = each(%mallocs)) {
|
||
|
if (not defined $reallocs{$address}) {
|
||
|
$sizes{$size}++;
|
||
|
}
|
||
|
}
|
||
|
while (my ($size, $count) = each(%sizes)) {
|
||
|
print "$size, /* $count */\n";
|
||
|
}
|