[erlang-questions] string in functions and memory allocation

Jesper Louis Andersen <>
Thu Jan 6 13:47:18 CET 2011

On Thu, Jan 6, 2011 at 11:12, Hynek Vychodil <> wrote:
> Constants (literals) are allocated in constant pool since Erlang
> R12B-0 so it will not be constructed in each function call.

And to add, neither is 'Value' in the examples. It will at most be a
smallish reference to a large value. And is no copy of 'PropList'
either but for the reference to it. Technically we are staring at a
function that will allocate nothing.


More information about the erlang-questions mailing list