[erlang-questions] mmap file to binary

Max Lapshin <>
Fri Apr 9 11:19:58 CEST 2010

> The trouble is that on Windows a mapped file may not be deleted, but the
> point in time at which a file is unmapped with this scheme is
> non-deterministic because it relies on the garbage-collector. Thus,
> there is no reliable way to delete a file after it's been mapped.

Thank you for explanation, but frankly speaking, I have no interest
about how my software works under windows.
I even havent' thought that windows has mmap =)

It will be ok for me just to have instruments to implement
functionality, that works under Linux, OS X and FreeBSD: I've never
met with anything else.

> Obviously on a Unix-like OS, there is no problem with unlinking a file
> that is in use, so everything works fine

Not exactly so: hard disk space will be still used, so problem is not
with ability to delete,
problem is in deterministic deletion of file. I understand this risk
and it is ok, because speed matters more, than
delay in deletion of file.

> [1]: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4715154

More information about the erlang-questions mailing list