[erlang-questions] [Q] Copying memory between processes

Bjorn Gustavsson bjorn@REDACTED
Wed May 23 11:34:52 CEST 2007


Ladislav Lenart <lenartlad@REDACTED> writes:
> 
> But as soon as this structure is sent to one other process
> the system is suddenly out of resources. The only reason
> this could happen (that I could think of) is: When the
> structure is copied to the heap of the other process, the
> identity is not preserved, that is each item references its
> own list of previous items (though equal). This would explain
> expontential growth of the memory.

Yes.

> Am I right? And if it so, what is the reason (performance)?

Yes. In typical applications, shared data structures are uncommon.

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB




More information about the erlang-questions mailing list