[erlang-questions] lists, binaries or something else?

Jay Nelson <>
Thu Jul 12 20:34:50 CEST 2012

Processes are private memory spaces. Depending on how you
construct the strings, you could spawn a process to create the
string convert it to binary and then send the binary as a message.
When the process ends, its entire memory space will be reclaimed.

The binary will live on the shared binary heap so the sending
won't be expensive. The question is the source of the data for
the string and whether that can be isolated after the process
is spawned. Passing a large data structure on the spawn
arguments causes a copy which might blow your memory.


More information about the erlang-questions mailing list