[erlang-questions] Debugging binary memory usage
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
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions