[erlang-questions] Implementation of erlang binary module

Karlo Kuna <>
Sat Jan 21 15:15:25 CET 2017


would this imply that erlang runtime is choosing to call bif if present
instead of erlang implemented function ??? is this general case or these
"alternative" implementations should be registered somehow somewhere??

and thak you for the search tip it worked

On Sat, Jan 21, 2017 at 2:38 PM, Dmytro Lytovchenko <
> wrote:

> Standard library rarely uses dynamic loaded SO/DLL modules (so called
> NIFs), rather they use BIF functions, code for them is included straight
> into Erlang/OTP C source and follows different rules than NIF. Have a
> search through source C files for binary_<function name>_<arity>, with high
> chance you will find the C source by this name.
>
> 2017-01-21 13:27 GMT+01:00 Karlo Kuna <>:
>
>> I was wandering how is standard module "binary" implemented
>> i am looking at source and i see that most functions are nifs (this makes
>> sense),
>> but there is no "-on_load" directive and i can't find c implementation.
>> Please can someone explain to me how is this module using nifs without
>> -on_load directive and also can tell me where is c implementation??
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170121/93ad22b4/attachment.html>


More information about the erlang-questions mailing list