Erlang VM

Yani Dzhurov yani.dzhurov@REDACTED
Tue Mar 28 08:55:14 CEST 2006

Hi guys,


I wondered how the Erlang virtual machine works with creating a lot of alike

This is my function for example:


  Tree = gb_tree(),






And if a "spawn" this function into a hundred of processes will the Erlang
VM machine create hundred of gb_trees, or it will create just one instance
and a hundred references to it. Sorry if my question is pretty stupid but
I'm very familiar with Erlang.


As far as I know in Java, if I have

String a = "abc";

String b = "abc";

The Java VM will create just one object string "abc" and point both 'a' and
'b' to that object, since string is immutable and there would be no
collisions with using that object. In Erlang objects are immutable also,
right ? So will the Erlang VM do the same as the Java one?






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3326 bytes
Desc: not available
URL: <>

More information about the erlang-questions mailing list