Skip to content

Latest commit

 

History

History
47 lines (23 loc) · 2.05 KB

BEAM_CODE_REFERENCES.md

File metadata and controls

47 lines (23 loc) · 2.05 KB

External Term Format

Official Erlang documentation on this topic

term_to_binary/2 docs

C implementation of the term_to_binary in ERTS.

Erlang GC

Garbage collect C implementation.

Erlang processes

erl_create_process function.

Be prepared to wait a liitle bit because erl_process.c file has almost 13500 lines of C code. This is a cornerstone of the whole Erlang platform I think.

BIFs

We always use BIFs in Erlang such as element or spawn_link or whatnot in our code.

gen and gen_server are based on the erlang:spawn BIF, hence I think it's important to know how BIFs are actually implemented. https://github.com/erlang/otp/blob/master/lib/stdlib/src/erl_internal.erl#L22

stdlib/erl_internal here is just a BIF-proxy because all the functions are implemented natively in C inside the ERTS/BEAM.

Core C implementation of BIFs resides here

Code Purger

The most important parts from the Erlang code purger such as purge, soft_purge, etc.

Standard Library

Lists module functionality. Some of the functions such as keyfind/3, keymember/3, etc. are implemented as BIFs and defined in a separate C file inside of BEAM.

Message Passing

Core functionality of the Erlang message passing

Internal BEAM emulator docs:

https://github.com/erlang/otp/tree/master/erts/emulator/internal_doc