mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: clarify mdbx_backlog_size().
Change-Id: I42170dded36b7259f61c028fefb72691ff791388
This commit is contained in:
parent
e00dce3543
commit
7ce1a4c0cf
10
src/mdbx.c
10
src/mdbx.c
@ -3532,10 +3532,12 @@ int mdbx_txn_abort(MDBX_txn *txn) {
|
||||
}
|
||||
|
||||
static __inline int mdbx_backlog_size(MDBX_txn *txn) {
|
||||
int reclaimed = txn->mt_env->me_reclaimed_pglist
|
||||
? MDBX_PNL_SIZE(txn->mt_env->me_reclaimed_pglist)
|
||||
: 0;
|
||||
return reclaimed + txn->mt_loose_count + txn->mt_end_pgno - txn->mt_next_pgno;
|
||||
int reclaimed_and_loose =
|
||||
txn->mt_env->me_reclaimed_pglist
|
||||
? MDBX_PNL_SIZE(txn->mt_env->me_reclaimed_pglist) +
|
||||
txn->mt_loose_count
|
||||
: 0;
|
||||
return reclaimed_and_loose + txn->mt_end_pgno - txn->mt_next_pgno;
|
||||
}
|
||||
|
||||
static __inline int mdbx_backlog_extragap(MDBX_env *env) {
|
||||
|
Loading…
Reference in New Issue
Block a user