« Return to Thread: why each erlang process sets 233 words as its default heap size?

Re: why each erlang process sets 233 words as its default heap size?

by Erik Stenman-2 :: Rate this Message:

Reply to Author | View in Thread


On 20 sep 2007, at 18.03, Jeremy Chow wrote:

> Hi all,
>       My first instinction is that it want to club together with  
> one process size  to reach exactly 1024 bytes . But each process  
> has more than 1024/4 -233 = 23 words size .
>       What's the author's original intention? why each erlang  
> process  sets 233 words as  its default heap size?

The Erlang runtime system allocates memory for a process in  
increments of Fibonacci numbers.
The rational is apparently that memory usage has a tendency to grow  
like the Fibonacci numbers,
whether this really pays off is questionable but the code has been kept.
233 is a reasonably sized Fibonacci number and seems seemingly  
randomly chosen as a good initial start size.

/Erik Stenman



_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

 « Return to Thread: why each erlang process sets 233 words as its default heap size?