[erlang-questions] Question about Erlang's term serialization for message passing

Christoph Dornheim <>
Tue Mar 6 23:56:07 CET 2007


Taavi Talvik <taavi <at> uninet.ee> writes:

> 
> Erlang does not have any "hidden in-memory pointer structure" at all.  
> As far
> as I understand (i am in no way erlang guru) only receiving of values is
> defined semantically. There are no "object graphs" in erlang. Only  
> values as
> ints, floats, pids, references, ports, lists etc.
> 
> Message size optimization probably can be implemented as implementation
> specific optimization. With hybrid heap it probably is implemented as  
> such.
> 
> But it is still optimization detail, which should be invisible on  
> language definition level.
> 
> best regards,
> taavi
> 
> 

At the language level, all data are values, but at the implementation level data
is built up by pointers to memory locations; so an Erlang term is internally
represented by a graph-like pointer structure. E.g. when creating a new list
L'=[a|L] from some list L their internal representations share memory since,
internally, L' has a pointer to L.

See also http://article.gmane.org/gmane.comp.lang.erlang.general/16122/

Regards,

Christoph





More information about the erlang-questions mailing list