[erlang-questions] Debugging binary memory usage

Patrik Nyblom <>
Tue Oct 30 16:31:41 CET 2012

On 10/24/2012 11:07 PM, Antonio SJ Musumeci wrote:
> Is there any way to find out what processes are referencing what 
> binaries? Or at least a list of binaries and their reference count 
> such as Funs in a crash dump? It seems like the dump contains 
> references to binary data ("=binary:xxxxxxx") but this is not referred 
> to in the crash dump doc.
Not in the crash dump, but in a living system you could do:
[erlang:process_info(P,binary) || P <- erlang:processes()].
(or something like it) Each tuple in the lists of binaries for a process 
contains the actual pointer, she size and the reference counter (in that 
order). At least it does so in current releases. The binary info tuple 
is deliberately not defined 
> Thanks.
> _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121030/59e0a2e4/attachment.html>

More information about the erlang-questions mailing list