recon
recon copied to clipboard
recon_alloc:memory(usage) > 1 ?
In 38 of 4258 cases, the result of this call is greater than 1. What can be the cause? The maximum value is 32.13506572.
The one reason I'd see for that is that there is memory allocation taking place between both calls. The usage call goes for the allocator data twice for ease of implementation: https://github.com/ferd/recon/blob/master/src/recon_alloc.erl#L226 I'm guessing this causes problems if you'Re not working from a snapshot.
Ok thanks - but can it then also be that values looking plausible (i.e. <= 1) are wrong ?
There's a chance, but I wouldn't expect the discrepancy to be too big unless you're trying the call on a VM that essentially does nothing but that call. The code could be reworked to make all calculations from a single snapshot.