aboutsummaryrefslogtreecommitdiff
path: root/db.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-07-10 14:00:32 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-07-10 14:00:32 -0600
commitcc8004c98058ad9a70bd3181cab57b4c72a26cb8 (patch)
tree1b7e4df114c5e1348b5dd34851f00fb7c17024ad /db.go
parentAdd freelist cache. (diff)
parentFix test for path errors. (diff)
downloaddedo-cc8004c98058ad9a70bd3181cab57b4c72a26cb8.tar.gz
dedo-cc8004c98058ad9a70bd3181cab57b4c72a26cb8.tar.xz
Merge branch 'master' of https://github.com/boltdb/bolt into free-cache
Diffstat (limited to 'db.go')
-rw-r--r--db.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/db.go b/db.go
index 4d7ec12..b839e23 100644
--- a/db.go
+++ b/db.go
@@ -212,7 +212,7 @@ func (db *DB) munmap() error {
// mmapSize determines the appropriate size for the mmap given the current size
// of the database. The minimum size is 4MB and doubles until it reaches 1GB.
func (db *DB) mmapSize(size int) int {
- if size < minMmapSize {
+ if size <= minMmapSize {
return minMmapSize
} else if size < maxMmapStep {
size *= 2