Merge pull request #55 from benbjohnson/fix-mmap-resize

Fix the mmap resize to use the correct size.
master
Ben Johnson 2014-02-27 14:37:11 -07:00
commit 9abba5dfa2
1 changed files with 1 additions and 1 deletions

2
db.go
View File

@ -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 {