mmap file to binary

Max Lapshin max.lapshin@REDACTED
Sat Apr 3 08:57:49 CEST 2010


I want to add mmap reading of files, because it have shown better
results on server, written in C, than plain reading.

There was discussion in 2007
http://www.erlang.org/pipermail/erlang-questions/2007-September/029560.html
and some blog posts:
http://steve.vinoski.net/blog/2007/09/29/more-file-processing-with-erlang/

In the latter, author say:
> because of mmap’s alignment restrictions combined with the way the Erlang runtime allocate binaries, I was forced to copy the data into the binary,

Have anything changed?

It seems to be possible to create binary from existing area in memory,
which is controlled by C code, not by erlang.
I'm ready to test with linked-in driver, but maybe, there are some
other ideas or implementations?


More information about the erlang-questions mailing list