diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2015-02-16 16:45:58 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2015-02-16 16:45:58 -0700 |
commit | c8ecb61df213b389af9da90983fc8bf5133e1007 (patch) | |
tree | ed4d491b6bfc44df308777f2ce1c2580caf2d543 /db.go | |
parent | README (diff) | |
parent | Fix large mmap resize. (diff) | |
download | dedo-c8ecb61df213b389af9da90983fc8bf5133e1007.tar.gz dedo-c8ecb61df213b389af9da90983fc8bf5133e1007.tar.xz |
Merge pull request #304 from benbjohnson/fix-large-resize
Fix large mmap resize
Diffstat (limited to 'db.go')
-rw-r--r-- | db.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -231,9 +231,9 @@ func (db *DB) mmapSize(size int) (int, error) { } // If larger than 1GB then grow by 1GB at a time. - sz := int64(size) + int64(maxMmapStep) + sz := int64(size) if remainder := sz % int64(maxMmapStep); remainder > 0 { - sz -= remainder + sz += int64(maxMmapStep) - remainder } // Ensure that the mmap size is a multiple of the page size. |