From 8b69a9fe05437f3729240cf44b02dfbb1293a119 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 13 Apr 2018 16:52:21 +0300 Subject: 64-bit Miranda to use 16 GB mmap --- plugins/Dbx_mdbx/src/dbintf.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins') 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 -- cgit v1.2.3