Binaries

Erik Stenman Erik.Stenman@REDACTED
Tue May 11 16:46:32 CEST 2004


Vlad Balin wrote:
> Could tell me please, which GC technique is used for 
> binaries? Is it differs from one for other types, such as 
> tuples and lists, or the same "stop-and-copy" algorithm?
 
Large binaries are reference counted and shared among 
all processes on one Erlang node. They are not copied,
neither by GC nor by message passing.
(The reference count causes a small overhead to the normal 
 GC to keep track of when a reference to a binary dies.)

Smaller binaries are kept on the process heap and
are GC:ed by the same mechanism as other Erlang terms.

I think that in the current system a binary is considered 
small if it is smaller than 64 words, but this is a vague
memory only, you'd better look in the source to be sure. 

Erik
--------------------------------------
I'm Happi, you should be happy.
Praeterea censeo 0xCA scribere Erlang posse. 




More information about the erlang-questions mailing list