[erlang-questions] Tuple memory size

Ulf Wiger ulf.wiger@REDACTED
Tue Feb 24 19:56:46 CET 2009


tsuraan <tsuraan@REDACTED> wrote:
> > The latter.
> 
> As a follow-up, is there a function that can be called to determine
> the amount of memory that is copied when sending a complex non-binary
> structure as a message between processes?  I've been using
> size(term_to_binary(Data)), which I think at least puts an upper bound
> on the size.  Is there a more accurate (i.e. correct) built-in
> function that finds the size of a data structure?

erts_debug:flat_size(Term) gives the flattened size (in words, AFAIR) of 
any Erlang term.

BR,
Ulf W
-- 
Ulf Wiger
CTO, Erlang Training & Consulting Ltd.
http://www.erlang-consulting.com



More information about the erlang-questions mailing list