From 20852b29c4c3913226184d67952500ae866b67ce Mon Sep 17 00:00:00 2001 From: funkygao Date: Wed, 25 Mar 2015 22:04:41 +0800 Subject: fix comment bug: minium db mmapSize is 1MB instead of 4MB --- db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db.go') diff --git a/db.go b/db.go index d4c85fb..0ba0e41 100644 --- a/db.go +++ b/db.go @@ -244,7 +244,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. +// 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. -- cgit v1.2.3 From 6d043164a90129f792615ee964f7b0956c2d38b7 Mon Sep 17 00:00:00 2001 From: funkygao Date: Wed, 25 Mar 2015 22:05:58 +0800 Subject: add comment: db.dataref is readonly --- db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db.go') diff --git a/db.go b/db.go index 0ba0e41..8f0e90b 100644 --- a/db.go +++ b/db.go @@ -73,7 +73,7 @@ type DB struct { path string file *os.File - dataref []byte + dataref []byte // mmap'ed readonly, write throws SEGV data *[maxMapSize]byte datasz int meta0 *meta -- cgit v1.2.3