mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 10:25:18 +00:00
unlimit stack on linux/mac
This commit is contained in:
parent
5454e38935
commit
da71d5ee01
|
@ -513,3 +513,26 @@ void interpolation_options_struct::apply(iz3base &b){
|
|||
b.set_option((*it).first,(*it).second);
|
||||
}
|
||||
|
||||
// On linux and mac, unlimit stack space so we get recursion
|
||||
|
||||
#if defined(_WINDOWS) || defined(_CYGWIN)
|
||||
|
||||
#else
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
class iz3stack_unlimiter {
|
||||
public:
|
||||
iz3stack_unlimiter() {
|
||||
struct rlimit rl = {RLIM_INFINITY, RLIM_INFINITY};
|
||||
setrlimit(RLIMIT_STACK, &rl);
|
||||
// nothing to be done if above fails
|
||||
}
|
||||
};
|
||||
|
||||
// initializing this will unlimit stack
|
||||
|
||||
iz3stack_unlimiter the_iz3stack_unlimiter;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue