diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-27 14:33:31 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-27 14:33:31 -0700 |
commit | 0477c1e0cec8f8f1fa0b71f2c04bc988f43fd01a (patch) | |
tree | 3dd21d3df98e00626dec99ad09d584a194fba7e4 | |
parent | Add bucket reclamation. (diff) | |
download | dedo-0477c1e0cec8f8f1fa0b71f2c04bc988f43fd01a.tar.gz dedo-0477c1e0cec8f8f1fa0b71f2c04bc988f43fd01a.tar.xz |
Fix the mmap resize to use the correct size.
Fixes #54. Previously the DB was calculating a minimum mmap size but
using the wrong variable after it calculated the size. This commit
changes the DB to use the correct variable.
-rw-r--r-- | db.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -146,7 +146,7 @@ func (db *DB) mmap(minsz int) error { if size < minsz { size = minsz } - size = db.mmapSize(minsz) + size = db.mmapSize(size) // Memory-map the data file as a byte slice. if db.data, err = db.syscall.Mmap(int(db.file.Fd()), 0, size, syscall.PROT_READ, syscall.MAP_SHARED); err != nil { |