Merge pull request #334 from funkygao/master

fix doc bug and add comment for db.dataref
master
Ben Johnson 2015-03-25 09:32:52 -06:00
commit 63ec32ef32
1 changed files with 2 additions and 2 deletions

4
db.go
View File

@ -73,7 +73,7 @@ type DB struct {
path string path string
file *os.File file *os.File
dataref []byte dataref []byte // mmap'ed readonly, write throws SEGV
data *[maxMapSize]byte data *[maxMapSize]byte
datasz int datasz int
meta0 *meta meta0 *meta
@ -244,7 +244,7 @@ func (db *DB) munmap() error {
} }
// mmapSize determines the appropriate size for the mmap given the current size // 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. // Returns an error if the new mmap size is greater than the max allowed.
func (db *DB) mmapSize(size int) (int, error) { func (db *DB) mmapSize(size int) (int, error) {
// Double the size from 1MB until 1GB. // Double the size from 1MB until 1GB.