Size of function and memory management

Thomas Lindgren thomasl_erlang@REDACTED
Mon Jan 31 10:22:58 CET 2005

--- Thomas Lindgren <thomasl_erlang@REDACTED> wrote:

> As far
> as I know, there is no stack allocation of data at
> this time. Garbage is reclaimed by the ordinary GC
> only.

I oversimplified things a bit, actually. If a term is
small enough to fit in a VM register, then it can be
saved on the stack. Such terms include small integers
(fixnums) and atoms, and perhaps others.

(Allocating a fresh atom may cause memory management
activity elsewhere, though: in the atom table.)

This case is usually not considered when one speaks of
"stack allocating data", though. Usually the intention
is to stack allocate data that would normally end up
on the heap.


Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 

More information about the erlang-questions mailing list