Memory handling description?
Thu Sep 11 12:41:18 CEST 2003
There are some papers from the HiPE project, under:
that could be of interest; mainly Jesper Wilhelmsson's masters
thesis "Exploring Alternative Memory Architectures for Erlang".
On Thu, 11 Sep 2003, Matthias Lang wrote:
> Zoltan Peter Toth writes:
> > Can anybody give me a reference to some technical document that
> > outlines how memory handling (heap, variable storage, message
> > passing, etc) is done in the Erlang machine ?
> > (e.g. when is memory allocated, released, etc.)
> I am not an expert on Erlang's memory handling, but until an expert
> answers, this may be better than no answer at all. It applies to the
> "normal" beam system, i.e. not the shared heap.
> - There is no document about it. Complete source code is freely
> available but hard to understand.
> - Erlang uses a garbage collector. If you don't know what that is,
> the GC FAQ may be of interest:
> - Each Erlang process has its own heap and its own stack.
> - There is a separate heap for binaries above a certain size.
> Such binaries are referred to by reference from e.g. process
> - Whenever a process needs more heap space, it will try to
> recover space by GCing. Failing that, it grows the heap.
> - Messages are passed between processes by copying them to the
> target process' heap. Large binaries are passed by reference.
> - When a process dies, all of its memory is given back to the
> runtime system.
> - ETS uses its own pool of memory
Richard Carlsson () (This space intentionally left blank.)
E-mail: WWW: http://user.it.uu.se/~richardc/
"Having users is like optimization: the wise course is to delay it."
-- Paul Graham
More information about the erlang-questions