Memory handling description?

Richard Carlsson richardc@REDACTED
Thu Sep 11 12:41:18 CEST 2003



There are some papers from the HiPE project, under:

	http://www.csd.uu.se/projects/hipe/publications.shtml

that could be of interest; mainly Jesper Wilhelmsson's masters
thesis "Exploring Alternative Memory Architectures for Erlang".

	/Richard




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:
>
>         http://www.iecc.com/gclist/GC-faq.html
>
>   - 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
>     heaps.
>
>   - 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
>
> Matthias
>

Richard Carlsson (richardc@REDACTED)   (This space intentionally left blank.)
E-mail: Richard.Carlsson@REDACTED	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 mailing list