mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
add count of memory allocations and way to limit allocations globally. Fix purification in nlsat_smt to fix regressions on QF_UFNRA
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
4675643271
commit
564da787fb
14 changed files with 88 additions and 32 deletions
|
@ -46,6 +46,11 @@ public:
|
|||
out_of_memory_error();
|
||||
};
|
||||
|
||||
class exceeded_memory_allocations : public z3_error {
|
||||
public:
|
||||
exceeded_memory_allocations();
|
||||
};
|
||||
|
||||
class memory {
|
||||
public:
|
||||
static bool is_out_of_memory();
|
||||
|
@ -53,6 +58,7 @@ public:
|
|||
static void set_high_watermark(size_t watermak);
|
||||
static bool above_high_watermark();
|
||||
static void set_max_size(size_t max_size);
|
||||
static void set_max_alloc_count(size_t max_count);
|
||||
static void finalize();
|
||||
static void display_max_usage(std::ostream& os);
|
||||
static void display_i_max_usage(std::ostream& os);
|
||||
|
@ -65,6 +71,7 @@ public:
|
|||
#endif
|
||||
static unsigned long long get_allocation_size();
|
||||
static unsigned long long get_max_used_memory();
|
||||
static unsigned long long get_allocation_count();
|
||||
// temporary hack to avoid out-of-memory crash in z3.exe
|
||||
static void exit_when_out_of_memory(bool flag, char const * msg);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue