On mac lmdb can't start with error "cannot allocate memory" until I not reduced magic number (#779)

This commit is contained in:
Alex Sharov 2020-07-24 20:47:03 +07:00 committed by GitHub
parent 95365c8f37
commit 7cc0b7e391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ func (opts lmdbOpts) Open() (KV, error) {
} }
opts.path, _ = ioutil.TempDir(os.TempDir(), "lmdb") opts.path, _ = ioutil.TempDir(os.TempDir(), "lmdb")
} else { } else {
err = env.SetMapSize(32 << 40) // 32TB err = env.SetMapSize(4 << 40) // 4TB
logger = log.New("lmdb", path.Base(opts.path)) logger = log.New("lmdb", path.Base(opts.path))
if err != nil { if err != nil {
return nil, err return nil, err