mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	unlimit stack on linux/mac
This commit is contained in:
		
							parent
							
								
									5454e38935
								
							
						
					
					
						commit
						da71d5ee01
					
				
					 1 changed files with 23 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue