summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/storage_lmdb.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index 7d11c9f..bf631a8 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -895,10 +895,15 @@ public:
895 if (RUNNING_ON_VALGRIND) { 895 if (RUNNING_ON_VALGRIND) {
896 // In order to run valgrind this size must be smaller than half your available RAM 896 // In order to run valgrind this size must be smaller than half your available RAM
897 // https://github.com/BVLC/caffe/issues/2404 897 // https://github.com/BVLC/caffe/issues/2404
898 mdb_env_set_mapsize(env, (size_t)10485760 * (size_t)1000); // 1MB * 1000 898 mdb_env_set_mapsize(env, (size_t)1048576 * (size_t)1000); // 1MB * 1000
899 } else { 899 } else {
900 //This is the maximum size of the db (but will not be used directly), so we make it large enough that we hopefully never run into the limit. 900 //This is the maximum size of the db (but will not be used directly), so we make it large enough that we hopefully never run into the limit.
901 mdb_env_set_mapsize(env, (size_t)10485760 * (size_t)100000); // 1MB * 1000 901#ifdef Q_OS_WIN
902 //Windows home 10 has a virtual address space limit of 128GB(https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778(v=vs.85).aspx#physical_memory_limits_windows_10)
903 mdb_env_set_mapsize(env, (size_t)1048576 * (size_t)100000); // 1MB * 100'000
904#else
905 mdb_env_set_mapsize(env, (size_t)1048576 * (size_t)100000); // 1MB * 100'000
906#endif
902 } 907 }
903 const bool readOnly = (mode == ReadOnly); 908 const bool readOnly = (mode == ReadOnly);
904 unsigned int flags = MDB_NOTLS; 909 unsigned int flags = MDB_NOTLS;