[erlang-questions] status of shared or hybrid heap?

Richard Carlsson richardc@REDACTED
Sun Sep 13 20:54:38 CEST 2009

tsuraan wrote:
> Erlang has support for -shared and -hybrid, which seem to be different
> ways of not having processes have totally separate heaps.  Where can I
> find documentation on these options?  Also, is there any plan for
> making one of the heap sharing options default at any point?  I've run
> into problems with blindly applying pmap with closures with large
> amounts of data, and having my program run out of memory.  Shared
> heaps would probably make this a lot less likely.

To my knowledge, both variants have been broken (can segfault) since
the SMP support was added to Erlang. Lack of manpower prevented
these alternative (and still experimental) memory management models
from being kept up to date. SMP required a lot of changes, and
maintaining the shared/hybrid memory models is a highly specialized
task; furthermore, the person who knew most about it has moved on
to greener fields. A somewhat sad situation, but on the upside we
did get good SMP support under the standard memory model.

Also note that the shared heap model had its own problems, mostly to
do with long global pause times during garbage collection, which is
generally a big no-no in server applications. The hybrid model was
more promising, but as mentioned, it is not in working order.


More information about the erlang-questions mailing list