3
0
Fork 0
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:
Nikolaj Bjorner 2015-06-22 07:45:40 +02:00
parent 4675643271
commit 564da787fb
14 changed files with 88 additions and 32 deletions

View file

@ -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);
};