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

John Hughes john.hughes@REDACTED
Sun Sep 13 22:27:42 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.
>

Sounds like a problem I run into a lot: when closures are copied to a new 
heap, then all sharing is lost... and there can be a lot of sharing in the 
data structures representing a closure. There's been discussion of a new 
version of term_to_binary and binary_to_term that would preserve sharing, 
but so far no implementation.

John 



More information about the erlang-questions mailing list