mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
reduce contention #2842
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
670e8f8d67
commit
f70696d8e7
3 changed files with 4 additions and 3 deletions
|
@ -35,8 +35,8 @@ static std::mutex g_log_mux;
|
|||
extern "C" {
|
||||
void Z3_close_log_unsafe(void) {
|
||||
if (g_z3_log != nullptr) {
|
||||
dealloc(g_z3_log);
|
||||
g_z3_log_enabled = false;
|
||||
dealloc(g_z3_log);
|
||||
g_z3_log = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,8 @@ struct th_rewriter_cfg : public default_rewriter_cfg {
|
|||
bool cache_all_results() const { return m_cache_all; }
|
||||
|
||||
bool max_steps_exceeded(unsigned num_steps) const {
|
||||
if (memory::get_allocation_size() > m_max_memory)
|
||||
if (m_max_memory != SIZE_MAX &&
|
||||
memory::get_allocation_size() > m_max_memory)
|
||||
throw rewriter_exception(Z3_MAX_MEMORY_MSG);
|
||||
return num_steps > m_max_steps;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue