How to portably extend a file accessed using mmap()
问题 We're experimenting with changing SQLite, an embedded database system, to use mmap() instead of the usual read() and write() calls to access the database file on disk. Using a single large mapping for the entire file. Assume that the file is small enough that we have no trouble finding space for this in virtual memory. So far so good. In many cases using mmap() seems to be a little faster than read() and write(). And in some cases much faster. Resizing the mapping in order to commit a write