[erlang-questions] memsup gives weird values

Cliff Moon cliff@REDACTED
Thu Mar 5 05:48:19 CET 2009


Has anyone noticed that memsup gives ridiculous numbers on OS X?  I have 
Mac OS X leopard and Erlang R12B-3 installed.  In a straight erl shell 
with nothing loaded I get the following:

application:load(sasl).
application:start(sasl).
application:load(os_mon).
application:start(os_mon).
5> memsup:get_system_memory_data().

[{total_memory,3139076000},
 {free_memory,569280000},
 {system_total_memory,3139076000}]

6> memsup:get_memory_data().

{3139076000,2569796000,{<0.5.0>,229732}}


Which is clearly wrong.  ps reports:

cliff    48425   0.0  0.2    89936   6428 s001  S+    8:40PM   0:00.18 
/p/lib/erlang//erts-5.6.3/bin/beam.smp

So a resident set size of about 6k.  Is this behavior fixed in later 
revisions of Erlang?  Or is this only expected to work on linux?



More information about the erlang-questions mailing list