mirror of https://github.com/hak5/bolt.git
Merge pull request #55 from benbjohnson/fix-mmap-resize
Fix the mmap resize to use the correct size.master
commit
9abba5dfa2
2
db.go
2
db.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue