summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-13 16:52:21 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-13 16:52:21 +0300
commit8b69a9fe05437f3729240cf44b02dfbb1293a119 (patch)
treee4241a0496663d5ed13653f8d487794d3739488f /plugins/Dbx_mdbx
parent6521e3996f4f452206c3bb38e8f45a791e19bdef (diff)
64-bit Miranda to use 16 GB mmap
Diffstat (limited to 'plugins/Dbx_mdbx')
-rw-r--r--plugins/Dbx_mdbx/src/dbintf.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp
index 3c00631639..23d332ad8a 100644
--- a/plugins/Dbx_mdbx/src/dbintf.cpp
+++ b/plugins/Dbx_mdbx/src/dbintf.cpp
@@ -215,10 +215,16 @@ STDMETHODIMP_(void) CDbxMDBX::SetCacheSafetyMode(BOOL bIsSet)
int CDbxMDBX::Map()
{
+ #ifdef _WIN64
+ __int64 upperLimit = 0x400000000ul;
+ #else
+ intptr_t upperLimit = 512ul << 20;
+ #endif
+
int rc = mdbx_env_set_geometry(m_env,
-1, // minimal lower limit
1ul << 20, // at least 1M for now
- 512ul << 20, // 512M upper size
+ upperLimit, // 512M upper size
1ul << 20, // 1M growth step
512ul << 10, // 512K shrink threshold
-1); // default page size