mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-10 16:44:13 +08:00
mdbx: backport - update MAX_PAGENO and MAX_MAPSIZE64.
This commit is contained in:
parent
5049c86517
commit
de44ecccd1
@ -160,7 +160,7 @@
|
|||||||
* size up to 2^44 bytes, in case of 4K pages. */
|
* size up to 2^44 bytes, in case of 4K pages. */
|
||||||
typedef uint32_t pgno_t;
|
typedef uint32_t pgno_t;
|
||||||
#define PRIaPGNO PRIu32
|
#define PRIaPGNO PRIu32
|
||||||
#define MAX_PAGENO ((pgno_t)UINT64_C(0xffffFFFFffff))
|
#define MAX_PAGENO UINT32_C(0x7FFFffff)
|
||||||
#define MIN_PAGENO NUM_METAS
|
#define MIN_PAGENO NUM_METAS
|
||||||
|
|
||||||
/* A transaction ID. */
|
/* A transaction ID. */
|
||||||
@ -389,9 +389,7 @@ typedef struct MDBX_page {
|
|||||||
#else
|
#else
|
||||||
#define MAX_MAPSIZE32 UINT32_C(0x7ff80000)
|
#define MAX_MAPSIZE32 UINT32_C(0x7ff80000)
|
||||||
#endif
|
#endif
|
||||||
#define MAX_MAPSIZE64 \
|
#define MAX_MAPSIZE64 (MAX_PAGENO * (uint64_t)MAX_PAGESIZE)
|
||||||
((sizeof(pgno_t) > 4) ? UINT64_C(0x7fffFFFFfff80000) \
|
|
||||||
: MAX_PAGENO * (uint64_t)MAX_PAGESIZE)
|
|
||||||
|
|
||||||
#define MAX_MAPSIZE ((sizeof(size_t) < 8) ? MAX_MAPSIZE32 : MAX_MAPSIZE64)
|
#define MAX_MAPSIZE ((sizeof(size_t) < 8) ? MAX_MAPSIZE32 : MAX_MAPSIZE64)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user