Why would one use
void *enif_alloc(size_t size) as opposed to
void *malloc(size_t size); when trying to allocate memory from an Erlang C NIF?
Reference does not specify much as to why.
http://www.erlang.org/doc/man/erl_nif.html#enif_alloc
I have seen NIF examples were malloc is used and I never see the enif_alloc. What does it do differently? Why is it better to use?