diff --git a/mdbx.h b/mdbx.h index 1e9094fe..cdf15c23 100644 --- a/mdbx.h +++ b/mdbx.h @@ -1949,8 +1949,8 @@ LIBMDBX_API int mdbx_env_get_fd(MDBX_env *env, mdbx_filehandle_t *fd); * option. * * Legacy mdbx_env_set_mapsize() correspond to calling mdbx_env_set_geometry() - * with the argument size_now=size and -1 (i.e. default) for all other - * parameters. + * with the arguments size_lower, size_now, size_upper equal to the size + * and -1 (i.e. default) for all other parameters. * * [in] env An environment handle returned by mdbx_env_create() * diff --git a/src/elements/core.c b/src/elements/core.c index d6a81a00..2a07bf12 100644 --- a/src/elements/core.c +++ b/src/elements/core.c @@ -6923,7 +6923,7 @@ bailout: } int __cold mdbx_env_set_mapsize(MDBX_env *env, size_t size) { - return mdbx_env_set_geometry(env, -1, size, -1, -1, -1, -1); + return mdbx_env_set_geometry(env, size, size, size, -1, -1, -1); } int __cold mdbx_env_set_maxdbs(MDBX_env *env, MDBX_dbi dbs) {