fix space leak during the first transaction

This commit is contained in:
Krasimir Angelov
2022-11-12 19:45:47 +01:00
parent 5ca00ded84
commit fd3c31b74d

View File

@@ -504,6 +504,9 @@ object PgfDB::register_revision(object o, txn_t txn_id)
found_entry->o = o; found_entry->o = o;
found_entry->ref_count = 1; found_entry->ref_count = 1;
found_entry->txn_id = txn_id; found_entry->txn_id = txn_id;
if (ms->min_txn_id > txn_id)
ms->min_txn_id = txn_id;
} }
#ifdef DEBUG_MEMORY_ALLOCATOR #ifdef DEBUG_MEMORY_ALLOCATOR
@@ -690,7 +693,7 @@ int PgfDB::init_state()
#endif #endif
ms->curr_txn_id = 1; ms->curr_txn_id = 1;
ms->min_txn_id = 0; ms->min_txn_id = 1;
ms->free_blocks = 0; ms->free_blocks = 0;
ms->free_descriptors = 0; ms->free_descriptors = 0;
ms->n_revisions = 0; ms->n_revisions = 0;