Browse Source

Reduce MDB map size on debug (for Valgrind).

Stefano Cossu 4 years ago
parent
commit
fd7a329b66
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/store_mdb.c

+ 3 - 1
src/store_mdb.c

@@ -10,7 +10,9 @@
 /**
  * Memory map size.
  */
-#if !(defined __LP64__ || defined __LLP64__) || \
+#if (defined DEBUG)
+    #define DEFAULT_MAPSIZE 1<<24 // 16Mb (limit for Valgrind)
+#elif !(defined __LP64__ || defined __LLP64__) || \
         defined _WIN32 && !defined _WIN64
     #define DEFAULT_MAPSIZE 1<<31 // 2Gb (limit for 32-bit systems)
 #else