Closed samlitowitz closed 9 months ago
Thank you!
Memory_Size_(bytes)
is a better name :+1:
However, BlocksCount
is really the number of blocks allocated by the function. Note that both MemorySize and BlocksCount only take into account the blocks that are live when you dump the profile, so memory that has been freed does not appear here.
For example, if you profile this program:
<?php
function eat(&$a, &$b)
{
$a = rand() . rand();
$b = rand() . rand();
}
eat($a, $b);
eat($c, $d);
memprof_dump_callgrind(STDOUT);
memprof will report that eat() allocated 192 bytes, in 4 blocks, and was called two times:
MemorySize metric:
BlocksCount metric:
@arnaud-lb Apologies for the delay, I have updated the second column to use the correct (and original) header of BlocksCount
.
Thank you @samlitowitz. Could you update the failing tests? I will merge once the checks pass.
@arnaud-lb Done!
Thank you!
Addresses #94