3
0
Fork 0
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:
Ken McMillan 2014-10-24 11:53:03 -07:00
parent 5454e38935
commit da71d5ee01

View file

@ -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