mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 05:18:21 +08:00
mdbx: reset length of PNL before shrinking.
This commit is contained in:
parent
7498286e3a
commit
e7da946fac
@ -678,6 +678,7 @@ static unsigned __hot mdbx_pnl_search(MDBX_PNL pnl, pgno_t id) {
|
||||
* [in,out] ppl Address of the PNL to shrink. */
|
||||
static void mdbx_pnl_shrink(MDBX_PNL *ppl) {
|
||||
MDBX_PNL pl = *ppl - 1;
|
||||
pl[1] = 0;
|
||||
if (unlikely(*pl > MDBX_LIST_MAX)) {
|
||||
/* shrink to MDBX_LIST_MAX */
|
||||
pl = realloc(pl, (MDBX_LIST_MAX + 2) * sizeof(pgno_t));
|
||||
|
Loading…
x
Reference in New Issue
Block a user