Skip to content

Routemap source tree

thijsterlouw edited this page Sep 13, 2010 · 18 revisions

Erlang OTP is a complex system. It can be a bit hard to find out where to look if you want to know the details of some implementation. This page is a simple routemap to the interesting parts of the Erlang OTP source code. With ‘interesting’ I mean for users who are interested in the internal workings of Erlang for example for performance reasons and networking.

/erts/

Erlang Run-Time System Application.This tree includes the virtual machine, the garbage collector, and the port mapper daemon. The documentation about ERTS shows that erl_driver, erl_nif, zlib, epmd, erl and erlang all belong to this basic application.

/erts/emulator/beam/

Erlang’s Beam VM: contains .c and .h files such as:

  1. erl_process.c,
  2. beam_emu.c,
  3. binary.c, The implementation of Erlang binaries (doc)
  4. erl_driver.h, Erlang drivers header, much more information in the docs
  5. io.c,
  6. bif.c the C implementations for builtin functions in the ‘erlang’ module (doc). It contains for example implementations of erlang:spawn() or erlang:link()
  7. erl_bif_port.c,
  8. erl_alloc.c (doc)
  9. erl_nif.c (doc) – The coolest addition to the R13B03 release, Native Implemented Functions!

/erts/emulator/drivers/common/

  1. inet_drv.c

/erts/emulator/hipe/

Erlang’s native code compiler. Interaction between Beam and Native code

  1. hipe_bif0.tab ‘Secret’ erlang functions for destructive array operations.

/lib/

Contains the Erlang libraries. That means: lots of files written in Erlang code to implement lots of functions you use every day.

/lib/kernel/src/

  1. application.erl
  2. gen_tcp.erl
  3. heart.erl
  4. inet.erl

/lib/stdlib/src/

  1. array.erl,
  2. dict.erl,
  3. ets.erl,
  4. gen_server.erl
  5. io.erl,
  6. timer.erl,
  7. unicode.erl

Note: feel free to edit and point out more interesting parts of the source code.