mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 11:25:51 +00:00
free memory in nex_creator during GB init
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
519bbc5af1
commit
580f229a16
3 changed files with 8 additions and 3 deletions
|
@ -155,7 +155,10 @@ public:
|
|||
const std::unordered_map<lpvar, unsigned>& powers() const { return m_powers; }
|
||||
std::unordered_map<lpvar, unsigned>& powers() { return m_powers; }
|
||||
|
||||
void add_to_allocated(nex* r) { m_allocated.push_back(r); }
|
||||
void add_to_allocated(nex* r) {
|
||||
m_allocated.push_back(r);
|
||||
CTRACE("grobner_stats_d", m_allocated.size() % 1000 == 0, tout << "m_allocated.size() = " << m_allocated.size() << "\n";);
|
||||
}
|
||||
|
||||
// NSB: we can use region allocation, but still need to invoke destructor
|
||||
// because of 'rational' (and m_children in nex_mul unless we get rid of this)
|
||||
|
@ -163,6 +166,7 @@ public:
|
|||
for (unsigned j = sz; j < m_allocated.size(); j++)
|
||||
dealloc(m_allocated[j]);
|
||||
m_allocated.resize(sz);
|
||||
TRACE("grobner_stats_d", tout << "m_allocated.size() = " << m_allocated.size() << "\n";);
|
||||
}
|
||||
|
||||
void clear() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue