[erlang-questions] mmap file to binary

Max Lapshin <>
Sat Apr 3 14:26:55 CEST 2010


On Sat, Apr 3, 2010 at 4:23 PM, Mikael Pettersson <> wrote:
> On Sat, 3 Apr 2010 10:57:49 +0400, Max Lapshin wrote:
>
> It looks to me like an off-heap ProcBin should work. They separate
> the object header (required by Erlang) from the actual data bytes,
> so the data bytes should be able to reside in an mmap:ed blob.
>
> The runtime system may need to be tweaked to munmap() the data rather
> than free() it when the binary dies, but that's a minor issue.
>

So, I need to make patch to erlang vm?

{ok, File} = file:open()
{ok, Bin} = file:mmap(File, ...)


More information about the erlang-questions mailing list