[erlang-questions] simple question about list memory consumption

Francesco Mazzoli <>
Fri Jul 6 15:27:30 CEST 2012


At Fri, 6 Jul 2012 15:08:30 +0200,
Sverker Eriksson wrote:
> Small enough integers (28/60 bit signed integers) *are* stored as immediates
> in the list cells.

How can this be, without some kind of tagging, since Erlang list are
heterogeneous - which would increase memory overhead anyway?

In other words, if I have [foo, 1, bar], if the 1 is unboxed, how does Erlang
know it is an integer?

--
Francesco * Often in error, never in doubt



More information about the erlang-questions mailing list