[erlang-questions] Erlang code loading

Robert Virding robert.virding@REDACTED
Tue Nov 22 23:55:37 CET 2011


Yes, of course there is only one copy of the code which is shared. Well two copies if you include the old version of the code which is also shared. If each process had its own copy then it would mean that when you spawn a new process you would have to make a new copy of all the code, which would be totally untenable.

Robert

----- Original Message -----
> 
> On 22/11/2011, at 12:50 AM, CGS wrote:
> 
> > One instance per process, one memory allocation per process (even
> > if it is the same code running). Erlang has no explicit knowledge
> > of beam shared objects as far as I know. If somebody knows
> > differently, please, correct me.
> 
> The original poster asked about "a huge FUNCTION".  Loading a module
> into a running Erlang system
> creates ONE copy of the code that is shared by ALL Erlang processes
> that use it.
> 
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
> 



More information about the erlang-questions mailing list