aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2015-05-18 11:51:49 -0600
committerBen Johnson <benbjohnson@yahoo.com>2015-05-18 11:51:49 -0600
commitc5eb8da41335eb85d4220e747831caafa8430ef3 (patch)
tree4ce2f623ea3169ab57c55058ed30877dde0940c3
parentMerge pull request #374 from oliver006/master (diff)
parentChange min mmap size from 1MB to 32KB. (diff)
downloaddedo-c5eb8da41335eb85d4220e747831caafa8430ef3.tar.gz
dedo-c5eb8da41335eb85d4220e747831caafa8430ef3.tar.xz
Merge pull request #375 from benbjohnson/min-mmap-size
Change min mmap size from 1MB to 32KB.
-rw-r--r--db.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/db.go b/db.go
index b78640f..5b905be 100644
--- a/db.go
+++ b/db.go
@@ -256,8 +256,8 @@ func (db *DB) munmap() error {
// of the database. The minimum size is 1MB and doubles until it reaches 1GB.
// Returns an error if the new mmap size is greater than the max allowed.
func (db *DB) mmapSize(size int) (int, error) {
- // Double the size from 1MB until 1GB.
- for i := uint(20); i <= 30; i++ {
+ // Double the size from 32KB until 1GB.
+ for i := uint(15); i <= 30; i++ {
if size <= 1<<i {
return 1 << i, nil
}