Search code examples
erlangembeddedmemory-mappingerlang-nif

How to do Memory-mapped IO in Erlang?


I have been considering using Erlang for an embedded system. The one thing I am missing in my research is the ability to do direct memory mapping.

Is this expected to be done via a NIF (Native Interface) or some other method (if so, what)?


Solution

  • There is no memory mapped IO interface in the Erlang VM. You would need to use NIF or alternatively you can try to make such IO subsystem available as an file descriptor. Then erlang:open_port/2 can be used to communicate with that.