aboutsummaryrefslogtreecommitdiff
path: root/src/lmdb/database.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-06 15:58:50 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-06 15:58:50 +0200
commitc61b3f0eadd4ad17398356d941684bc7de58ebcf (patch)
tree85c195348911e779b098a14526de8fc38e334c37 /src/lmdb/database.cpp
parentMerge pull request #5343 (diff)
parentlmdb: fix size_t size issues on 32 bit (diff)
downloadmonero-c61b3f0eadd4ad17398356d941684bc7de58ebcf.tar.xz
Merge pull request #5344
5e1a3e48 lmdb: fix size_t size issues on 32 bit (moneromooo-monero)
Diffstat (limited to 'src/lmdb/database.cpp')
-rw-r--r--src/lmdb/database.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lmdb/database.cpp b/src/lmdb/database.cpp
index c6b244671..ccab1902a 100644
--- a/src/lmdb/database.cpp
+++ b/src/lmdb/database.cpp
@@ -46,7 +46,7 @@ namespace lmdb
{
namespace
{
- constexpr const std::size_t max_resize = 1 * 1024 * 1024 * 1024; // 1 GB
+ constexpr const mdb_size_t max_resize = 1 * 1024 * 1024 * 1024; // 1 GB
void acquire_context(context& ctx) noexcept
{
while (ctx.lock.test_and_set());
@@ -136,7 +136,7 @@ namespace lmdb
MDB_envinfo info{};
MONERO_LMDB_CHECK(mdb_env_info(handle(), &info));
- const std::size_t resize = std::min(info.me_mapsize, max_resize);
+ const mdb_size_t resize = std::min(info.me_mapsize, max_resize);
const int err = mdb_env_set_mapsize(handle(), info.me_mapsize + resize);
ctx.lock.clear();
if (err)