[erlang-questions] Shared/Hybrid Heap
Mon Oct 11 19:02:52 CEST 2010
AFAIK, I believe the idea of a shared heap is that multiple processes,
instead of having their own heap (or perhaps in addition to) would all
allocate from a common heap. This would mean that any message passing from
processes in that shared heap, can simply pass a pointer around and wouldn't
need to copy it, hence the speed gain and lower memory usage. The idea of
making it a hybrid system is that a default would be set (ie: current per
process heap behavior) and then you would flag processes when you spawn them
with which system/heap they should use. Obviously, messaging a process not
in the common heap would require copying as it currently does.
This obviously has important implications for garbage collection since
either it will need to be performed progressively (as each process in the
group stops, mark the memory they use, etc) or stop all the running
processes at once while GC runs. Or maybe a more elaborate concurrent GC
algorithm could work as well.
Since the implications are far reaching, an EPP would probably be required
and ultimately, it might be required to have it be a different binary (to
prevent the currently used binary to grow in size from all the added VM/lib
code which could be an issue on embedded devices).
If you search in the mailing list history, you'll find a few posts on the
subject explaining a few more details.
2010/10/11 Svatopluk Šperka <>
> does anyone know if there's any progress concerning shared/hybrid heap in
> Erlang ? I'm prototyping data-intensive app in Erlang and suspect that using
> hybrid/shared heap would have huge impact at least in terms of memory
> consumption and.
> Btw. do I understand it right that "shared" here means that everything is
> allocated on shared heap and "hybrid" that only what is analysed to be sent
> is allocated there (as described in R. Carlsson et al.: Message analysis for
> concurrent languages) ?
> Svatopluk Šperka
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
More information about the erlang-questions