[erlang-questions] Erlang processes and state management design
Wed Oct 24 16:56:46 CEST 2007
--- Alexander Lamb <>
> But you seem to not consider solution 2 (process
> dictionnary). Is
> this because it is not efficient, or at least not
> more efficient than
I'd recommend not relying on the process dictionary.
Granted, there are cases when it is useful, but you
get all the problems of (process-)global variables
> Also, I read somewhere that the heap for processes
> in Erlang was
> rather small for historical reasons. If I store data
> in the
> parameters or in the process dictionnary, will I run
> into some limit?
A process heap is by default small _initially_, but it
will grow dynamically on demand. It's just an
optimization to permit plenty of processes without
running out of memory.
> Alternatively, I suppose the data for ETS structures
> are stored on
> the node's heap and not in the process heap? Is this
As far as I know, yes. However, reading data from ets
copies it into the process heap. (As I understand it,
this is true even for the hybrid runtime system.)
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the erlang-questions