Richard Carlsson richardc@REDACTED
Wed Jun 2 11:49:04 CEST 2004

On Wed, 2 Jun 2004, Shawn Pearce wrote:

> Actually I think beam supports a single heap system now.  Its a
> compile time ./configure flag, but it gives you a single large heap.
> Messages are just (more or less) pointers at that point.  But odd
> thing is the single heap can run slower in some cases.

The shared-heap system should be built by default when you make
the system, so the only thing needed to run it is a flag to 'erl':

  $ erl -shared
  Erlang (BEAM) emulator version 5.3 [source] [hipe] [shared heap]

  Eshell V5.3  (abort with ^G)

The only caveat is that of large amounts of live data, because the
current (copying) garbage collector was not designed for such cases.
(ETS tables and large binaries don't count - they are not on the heap.)
In particular, the GC pauses may be too long for a sensitive app.
We hope to have a better GC any year now. :-)

(On a serious note, it's a lot more difficult to change the current
memory management than you'd ever guess. Otherwise we would have done
this ages ago.)

However, *try it first* before you decide whether it's right for your
application or not - don't write it off beforehand. In many cases it
will give you a speedup, and it can reduce the memory usage quite a lot.


Richard Carlsson (richardc@REDACTED)   (This space intentionally left blank.)
E-mail: Richard.Carlsson@REDACTED	WWW:
 "Having users is like optimization: the wise course is to delay it."
   -- Paul Graham

More information about the erlang-questions mailing list