mdbx: fix operation for unusual small/large system page size.

More for https://github.com/erthink/libmdbx/issues/157

Change-Id: I4f2ed54b50653d0375538b82c48590d1037cd93b
This commit is contained in:
Leonid Yuriev
2021-01-29 21:19:58 +03:00
parent 6cfac546a1
commit f698f07ff9
6 changed files with 34 additions and 14 deletions

6
mdbx.h
View File

@@ -2852,6 +2852,12 @@ LIBMDBX_INLINE_API(int, mdbx_env_get_maxdbs,
return rc;
}
/** \brief Returns the default size of database page for the current system.
* \ingroup c_statinfo
* \details Default size of database page depends on the size of the system
* page and usually exactly match it. */
MDBX_NOTHROW_PURE_FUNCTION LIBMDBX_API size_t mdbx_default_pagesize(void);
/** \brief Get the maximum size of keys can write.
* \ingroup c_statinfo
*