[erlang-questions] Safe way to cache atoms in NIF: driver_mk_atom replacement

Lukas Larsson <>
Fri May 4 15:35:17 CEST 2012


If I understand you correctly the answer is yes.

I think the crypto implementation[1] does exactly this and since
Sverker wrote both crypto and the NIF support I would say that it is
safe :)

Lukas

[1] https://github.com/erlang/otp/blob/maint/lib/crypto/c_src/crypto.c#L300

On Fri, May 4, 2012 at 3:22 PM, Max Lapshin <> wrote:
> Is there a way to cache atoms in NIF?
>
> Is it ok just to store in static variable result of enif_make_atom ?
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list