Skip to content
This repository was archived by the owner on Mar 9, 2019. It is now read-only.

Commit c5eb8da

Browse files
committed
Merge pull request #375 from benbjohnson/min-mmap-size
Change min mmap size from 1MB to 32KB.
2 parents 75e094b + a450f84 commit c5eb8da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

db.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ func (db *DB) munmap() error {
256256
// of the database. The minimum size is 1MB and doubles until it reaches 1GB.
257257
// Returns an error if the new mmap size is greater than the max allowed.
258258
func (db *DB) mmapSize(size int) (int, error) {
259-
// Double the size from 1MB until 1GB.
260-
for i := uint(20); i <= 30; i++ {
259+
// Double the size from 32KB until 1GB.
260+
for i := uint(15); i <= 30; i++ {
261261
if size <= 1<<i {
262262
return 1 << i, nil
263263
}

0 commit comments

Comments
 (0)