[erlang-questions] term_to_binary and message passing

Kenneth Lundin kenneth.lundin@REDACTED
Thu Dec 28 16:02:27 CET 2006


On 12/28/06, Joel Reymont <joelr1@REDACTED> wrote:
> junior:~ joelr$ erl
> Erlang (BEAM) emulator version 5.5 [source] [async-threads:0] [hipe]
>
> Eshell V5.5  (abort with ^G)
> 1> size(term_to_binary(0.2)).
> 33
>
> Does this mean that any float I send within the VM will result in a
> 33-byte message?
>
>         Thanks, Joel

This is the size (with an extra tag byte added) of the float in
Erlangs external format which is used
in the communication between Erlang-nodes.

Internally within one VM the float will be represented with 3 words which means
12 bytes in a VM built for a 32 bit processor.
Thus in internal message passing within a VM the float occupies 12 bytes.
If the VM is BUILT for a 64 bit processor it will use twice as much
i.e 24 bytes.

/Kenneth
>
> --
> http://wagerlabs.com/
>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list