From: Richard Russon Date: Mon, 12 Dec 2016 22:33:19 +0000 (+0000) Subject: fix: increase the max lmdb database size X-Git-Tag: neomutt-20170113~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d337642e701b1dde4b5d0812e01c85f41ba65ca;p=neomutt fix: increase the max lmdb database size A user, with over 400,000 emails was getting the error: MDB_MAP_FULL: Environment mapsize limit reached This commit increases the maximum database size to 2GiB. The file is mmap(2)'d into memory, so mutt shouldn't actually use this much memory. Fixes: #267 --- diff --git a/hcache-lmdb.c b/hcache-lmdb.c index 9ebaef319..4b35daa95 100644 --- a/hcache-lmdb.c +++ b/hcache-lmdb.c @@ -26,9 +26,12 @@ #include "hcache-backend.h" #include "lib.h" -#define LMDB_DB_SIZE (1024 * 1024 * 1024) #include +/* The maximum size of the database file (2GiB). + * The file is mmap(2)'d into memory. */ +const size_t LMDB_DB_SIZE = 2147483648; + enum mdb_txn_mode { txn_uninitialized = 0,