[erlang-bugs] R13B-0, R12B-5 bug in erlang:memory/1
Rickard Green
rickard.s.green@REDACTED
Wed May 20 11:26:57 CEST 2009
> It appears that erlang:memory(processes_used) incorrectly return 0
> instead of the value it returns when included in the erlang:memory()
> result.
>
> This behaviour occurs in R13B:
>
>> {erlang:memory(), erlang:memory(processes_used),
erlang:memory(processes), erlang:system_info(version)}.
> {[{total,4354480},
> {processes,1104752},
> {processes_used,1100128},
> {system,3249728},
> {atom,308005},
> {atom_used,281638},
> {binary,18800},
> {code,2010109},
> {ets,136224}],
> 0, % <--- incorrect
> 1104752, % <--- correct
> "5.7.1"}
>
> This behaviour also happens in R12B-5 as far as I can tell.
>
> As near as I can tell the problem is here,
>
http://github.com/mfoemmel/erlang-otp/blob/master/erts/emulator/beam/erl_alloc.c#L1768
> -- want.processes is not set and/or want.processes_used is not tested.
>
> Cheers,
> --
> Geoff Cant
Thanks for the bug report. It will be fixed in R13B01.
Regards,
Rickard
--
Rickard Green, Erlang/OTP, Ericsson AB.
More information about the erlang-bugs
mailing list