[erlang-questions] append to a memory-mapped file

Joel Reymont <>
Thu Dec 16 12:36:35 CET 2010


Morten,

On Dec 16, 2010, at 11:31 AM, Morten Krogh wrote:

> What about keeping variables with the file size, the size of your data, and then when you want to append beyond the end of the file, you ftruncate and mmap again. The ftruncate should be with much more than 8 bytes of course.

You are suggesting pre-allocating a file and writing to a specific position rather than appending to the end, correct?

	Thanks, Joel

---
http://twitter.com/wagerlabs



More information about the erlang-questions mailing list