[erlang-questions] memory allocation and constant pool behavior

James Hague <>
Mon May 23 16:02:48 CEST 2011


The only memory allocation done at runtime in your function is for a
single two-element tuple containing pointers to existing tuples. It's
the per tuple overhead + 2 words. According to the efficiency guide,
tuple overhead is 2 words, giving a total of 4.

(I had previously thought that the tuple overhead was 1 word, but the
efficiency guide claims it to be 2.  Did that change at some point or
have I always been mistaken?)



More information about the erlang-questions mailing list