Memory consumption and memory management: How does it work ?

Mickael Remond mickael.remond@REDACTED
Sat Jan 15 16:12:04 CET 2005

James Hague wrote:
>>- On another side, calling garbage_collect reduce notably the memory
>>footprint. The application memory occupation is still growing constantly
>>but, garbage_collect free nearly a quarter of the memory (100 Mo).
> Are you using large binaries?  One hole in the Erlang runtime system
> is that binaries greater than a certain small size (64 bytes I think)
> are allocated outside the current process heap.  This is so they can
> be passed to other processes without copying.  But the size of these
> binaries are not used to determine when garbage collection is needed. 
> If you create large binaries quickly you can fill memory with binaries
> before the process heap gets garbage collected.

I think binary allocation is most of the time dealing with bigger than 
64 bytes binaries.
Your message let me wondering what are then the best practice regarding 
this behaviour of the garbage collector ?
Did you have to write something special in your code to ensure proper 
garbage collection ?

Mickaël Rémond

More information about the erlang-questions mailing list