diff --git a/test/main.cc b/test/main.cc index fe67c103..c201c20e 100644 --- a/test/main.cc +++ b/test/main.cc @@ -134,9 +134,8 @@ void actor_params::set_defaults(const std::string &tmpdir) { table_flags = MDBX_DUPSORT; size_lower = -1; - size_now = - intptr_t(1024) * 1024 * ((table_flags & MDBX_DUPSORT) ? 256 : 1024); - size_now = std::max(size_now, mdbx_limits_dbsize_max(-1)); + size_now = intptr_t((table_flags & MDBX_DUPSORT) ? 256 : 1024) << 20; + size_now = std::min(size_now, mdbx_limits_dbsize_max(-1)); size_upper = -1; shrink_threshold = -1; growth_step = -1;