[erlang-questions] Erlang and Memory management
Robert Virding
robert.virding@REDACTED
Wed Jun 1 00:14:38 CEST 2011
----- "Kostis Sagonas" <kostis@REDACTED> wrote:
> Robert Virding wrote:
> > I just want to point out that these rules are BEAM specific and not
> Erlang specific.
>
> Well, this is not correct: the BEAM nowhere specifies that its
> instruction set has to be implemented using a private heap
> architecture.
> In fact, we successfully used the BEAM instruction set to implement
>
> both a shared heap and a hybrid heap implementation. See:
>
> http://user.it.uu.se/~kostis/Papers/heap.pdf
Yes, I know that the instruction set says nothing about process heaps. I was referring to the BEAM *IMPLEMENTATION* which is based on separate process heaps and copying messages. The efficiency guides mentioned relate to the implementation and are BEAM specific.
> > So on an implementation with a single heap all data is shared. Now
> there aren't currently many single heap implementations, to be exact
> only one, erjang (Erlang on the JVM). :-)
>
> There have been more. We had an OTP system with a shared heap and the
> hybrid heap system was part of OTP for quite a while. IMO, it's too
> bad
> that it was not maintained when Erlang/OTP was extended to support SMP
> architectures.
>
> Also, the ETOS (Erlang to Scheme) system was based on a shared heap
> architecture.
I quite agree with you, I also think a shared heap architecture is the way to go and doing an SMP version would be very interesting. My only gripe with erjang is that it cannot yet use SMPs properly. But I assume they will fix that. A shared heap architecture could change
I suppose my main gripe is really that it is not always clear what is language specific and what is implementation specific.
Robert
More information about the erlang-questions
mailing list