mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 19:44:13 +08:00
mdbx: simplify page_unspill()
.
Change-Id: Iaa182d1feaf2abb59015725f000a3d9e0c57de8d
This commit is contained in:
parent
3622433cf4
commit
6d3ff10165
@ -6398,10 +6398,7 @@ static int __must_check_result mdbx_page_unspill(MDBX_txn *const txn,
|
|||||||
MDBX_page *np = mdbx_page_malloc(txn, npages);
|
MDBX_page *np = mdbx_page_malloc(txn, npages);
|
||||||
if (unlikely(!np))
|
if (unlikely(!np))
|
||||||
return MDBX_ENOMEM;
|
return MDBX_ENOMEM;
|
||||||
if (likely(npages == 1))
|
mdbx_page_copy(np, mp, pgno2bytes(txn->mt_env, npages));
|
||||||
mdbx_page_copy(np, mp, txn->mt_env->me_psize);
|
|
||||||
else
|
|
||||||
memcpy(np, mp, pgno2bytes(txn->mt_env, npages));
|
|
||||||
mdbx_debug("unspill page %" PRIaPGNO, mp->mp_pgno);
|
mdbx_debug("unspill page %" PRIaPGNO, mp->mp_pgno);
|
||||||
if (scan == txn) {
|
if (scan == txn) {
|
||||||
/* If in current txn, this page is no longer spilled.
|
/* If in current txn, this page is no longer spilled.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user