[erlang-questions] mmap file to binary

Max Lapshin <>
Thu Apr 8 22:36:58 CEST 2010

I've thought a lot about mmap usage in erlang and haven't found any
good solution.
Main idea is that when file is mmaped to address space, it is possible
to take chunks from it without any copying:

{ok, Bin} = file:mmap(File),
<<_:LargeOffset/binary, InsideBinary:Size/binary, _/binary>> = Bin,

But what to do, when file is closed and all binaries, that referred
into this address space becomes unusable?

More information about the erlang-questions mailing list