From fd3c31b74d36488435b38f0b3da5c4c24aa6fcf5 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Sat, 12 Nov 2022 19:45:47 +0100 Subject: [PATCH] fix space leak during the first transaction --- src/runtime/c/pgf/db.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/runtime/c/pgf/db.cxx b/src/runtime/c/pgf/db.cxx index 9970586ab..73b0ce802 100644 --- a/src/runtime/c/pgf/db.cxx +++ b/src/runtime/c/pgf/db.cxx @@ -504,6 +504,9 @@ object PgfDB::register_revision(object o, txn_t txn_id) found_entry->o = o; found_entry->ref_count = 1; found_entry->txn_id = txn_id; + + if (ms->min_txn_id > txn_id) + ms->min_txn_id = txn_id; } #ifdef DEBUG_MEMORY_ALLOCATOR @@ -690,7 +693,7 @@ int PgfDB::init_state() #endif ms->curr_txn_id = 1; - ms->min_txn_id = 0; + ms->min_txn_id = 1; ms->free_blocks = 0; ms->free_descriptors = 0; ms->n_revisions = 0;