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
#include "hcache-backend.h"
#include "lib.h"
-#define LMDB_DB_SIZE (1024 * 1024 * 1024)
#include <lmdb.h>
+/* 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,