lies, damn lies and erlang memory use
Mon Oct 21 15:52:03 CEST 2002
Matthias Lang wrote:
> (Yes, you detect my tone of doubt, which is provoked by there being
> many different BIFs and things for reporting on Erlang memory use, but
> it's not very obvious which ones refer to what. They also seem to lie
> quite a bit, for instance:
> - c:memory().
> Looks suspect; it's "total" is always much less than
> the sum of the parts it reports, e.g. on x86 linux:
> Eshell V5.1.2 (abort with ^G)
> 1> c:memory().
total = processes + system
system = atom + binary + code + ets + <other>
atom = atom_used + <atom_not_used>
<real_total> = processes + <real_system>
<real_system> = system + <blocks_we_missed>
(things inside <> are not part of the result returned by c:memory())
See the c(3) man page.
Note, c:memory() tries to give you an answer to how much memory the
emulator have allocated which is not the same as the total size of all
Rickard Green (Erlang/OTP)
More information about the erlang-questions