mirror of
https://github.com/isar/libmdbx.git
synced 2025-11-07 07:18:56 +08:00
mdbx: support for huge transactions (MDBX_HUGE_TRANSACTIONS option).
Change-Id: I5d6cce6a7fb816add8cb4c066cc50f31cdebf9d5
This commit is contained in:
@@ -647,9 +647,16 @@ typedef MDBX_DP *MDBX_DPL;
|
||||
#define MDBX_PNL_GRANULATE 1024
|
||||
#define MDBX_PNL_INITIAL \
|
||||
(MDBX_PNL_GRANULATE - 2 - MDBX_ASSUME_MALLOC_OVERHEAD / sizeof(pgno_t))
|
||||
|
||||
#if MDBX_HUGE_TRANSACTIONS
|
||||
#define MDBX_PNL_MAX \
|
||||
((1u << 26) - 2 - MDBX_ASSUME_MALLOC_OVERHEAD / sizeof(pgno_t))
|
||||
#define MDBX_DPL_TXNFULL (MDBX_PNL_MAX / 2)
|
||||
#else
|
||||
#define MDBX_PNL_MAX \
|
||||
((1u << 24) - 2 - MDBX_ASSUME_MALLOC_OVERHEAD / sizeof(pgno_t))
|
||||
#define MDBX_DPL_TXNFULL (MDBX_PNL_MAX / 4)
|
||||
#endif /* MDBX_HUGE_TRANSACTIONS */
|
||||
|
||||
#define MDBX_TXL_GRANULATE 32
|
||||
#define MDBX_TXL_INITIAL \
|
||||
@@ -925,7 +932,7 @@ struct MDBX_env {
|
||||
MDBX_page *me_dpages; /* list of malloc'd blocks for re-use */
|
||||
/* PNL of pages that became unused in a write txn */
|
||||
MDBX_PNL me_retired_pages;
|
||||
/* MDBX_DP of pages written during a write txn. Length MDBX_DPL_TXNFULL. */
|
||||
/* MDBX_DP of pages written during a write txn. */
|
||||
MDBX_DPL me_dirtylist;
|
||||
/* Number of freelist items that can fit in a single overflow page */
|
||||
unsigned me_maxgc_ov1page;
|
||||
|
||||
Reference in New Issue
Block a user