[erlang-questions] Basic atom question

Raimo Niskanen raimo+erlang-questions@REDACTED
Mon May 20 09:25:18 CEST 2013


On Thu, May 16, 2013 at 10:41:43PM +0200, Martin Hedberg wrote:
> 
> 
> Hello there 
> 
> Newbie wan Kenobi here again with a small question. :-) When the system restarts atoms are cleared but 
> I wonder: Is it enough to restart the process that the atoms were declared in, to clear the memory from it? 

As others have answered; atoms are never garbage collected.
After system start no atom is ever deleted on that VM.

There have been discussions about atom garbage collect but it
is a tricky problem since you want to keep the properties of
atoms especially size and speed..

Therefore the current recommendation is to not use atoms in excess:

    http://www.erlang.org/doc/efficiency_guide/commoncaveats.html#id61516

The number of atoms allowed is supposed to be enough for any number
that will be introduced by loaded code and by communicating with
other node's loaded code, but the number can be adjusted if your
system requires it.

It is when you start creating atoms dynamically you have a
disaster waiting to happen...


> 
> Best regards 
> 
> Martin
> 
> 
> 
> 
> From: skribent_har@REDACTED
> To: erlang-questions@REDACTED
> Subject: A small question about macros
> Date: Thu, 16 May 2013 06:04:00 +0200
> 
> 
> 
> 
> 
> 
> Hi there 
> 
> Have begun to take my first "baby steps" with Erlang (holding on to books and tutorials). 
> I read about how to make macros in the language. However I wonder how I do if I want 
> to have blank spaces in my commands? So I just can write, for example: "repeat 5 times". 
> 
> Hope you don't see me as a heretic if I want to HyperTalk-ificat Erlang a little bit. :-) 
> 
> I am very grateful for any help. 
> 
> Best regards 
> 
> Martin
>  		 	   		   		 	   		   		 	   		  

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


-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list