diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-24 10:24:39 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-24 10:24:39 +0200 |
commit | 7e910179f1349d1245211933d95cda2dc13cd617 (patch) | |
tree | 1ea6b6503db9cbd5f97cd3da2871abc424890307 | |
parent | 46863ca3f5cc88ba4f3ecf9a2d00fc1fc3f30ec7 (diff) | |
download | sink-7e910179f1349d1245211933d95cda2dc13cd617.tar.gz sink-7e910179f1349d1245211933d95cda2dc13cd617.zip |
We were off by a factor of 10
It's possible that we therefore went over the virtual address space
limit on windows which is 128GB.
-rw-r--r-- | common/storage_lmdb.cpp | 9 |
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; |