Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix __db.00* file to get the maximum size in advance
According to the following rules of mmap, fix __db.00* file to get the maximum size in advance so that __db.00* file is not expanded. From mmap(2) manpage: The effect of changing the size of the underlying file of a mapping on the pages that correspond to added or removed regions of the file is unspecified. From mmap in IEEE Std 1003.1-2017: If the size of the mapped file changes after the call to mmap() as a result of some other operation on the mapped file, the effect of references to portions of the mapped region that correspond to added or removed portions of the file is unspecified.
- Loading branch information