[erlang-questions] Data locality and the Erlang Runtime

Vincent Siliakus zambal@REDACTED
Thu Dec 12 13:32:47 CET 2013

Thanks for the extra insight.

As a side note, I really enjoyed reading your functional game programming
articles at the time you published them. Do you have any plans for a
sequel? :)


Op woensdag 11 december 2013 16:39:55 UTC+1 schreef James Hague:
In C++, memory blocks can be allocated anywhere. If you malloc/new 50
blocks, they could be in 50 different parts of the address space. It
all depends on the memory allocator. In Erlang, and any language with
a compacting garbage collector, data is allocated sequentially. With a
small per-process heap, you might only have 4 or 16K of data, all
contained within a consecutive address space.

I wrote an action game in Erlang a few years ago, and if I mapped out
what all of the data looked like in memory it would have been a crazy,
tangled mess of pointers. The entire game ran at 60fps and only used a
small fraction of the available CPU (this was on a laptop from 2006).

> _________________
> erlang-questions mailing list
> erlang-q...@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131212/b6e3e349/attachment.htm>

More information about the erlang-questions mailing list