[erlang-questions] Small and large (>=64B) binaries? How do they differ?
Thu Sep 21 16:54:13 CEST 2017
Okay thanks for the clarifications.
How about the opposite: an Erlang process which holds pointers to a large
number of RefCounted
Is there any performance penalty (ex. affected by GC) of doing that?
> On 09/20/2017 06:39 PM, Frank Muller wrote:
> > Thanks again Dmytro for your time.
> > Let assume I’m inside my NIF and would like to increment the refcount of
> > binary (hope this is the right call: enif_keep_resource).
> No, enif_keep_resource does not work on binaries.
> "Resources" are a concept of their own and binaries are not resources.
> Unfortunately there is no enif_keep_binary. The only use for such a
> is if you want to keep binaries alive even no processes are referring to
> And you would need some native data structure with pointers to those
> in order to find them without a binary term.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions