mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* thread_pthread.c (ruby_init_stack): range of rlim_cur may be
larger than int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									bb8a49812a
								
							
						
					
					
						commit
						bb1811d6a3
					
				
					 2 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,7 @@
 | 
			
		|||
Thu Mar 12 05:09:56 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
Thu Mar 12 05:12:53 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* thread_pthread.c (ruby_init_stack): range of rlim_cur may be
 | 
			
		||||
	  larger than int.
 | 
			
		||||
 | 
			
		||||
	* missing/vsnprintf.c (BSD_vfprintf): commented out code which has
 | 
			
		||||
	  no effect at all.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -292,10 +292,10 @@ ruby_init_stack(VALUE *addr
 | 
			
		|||
	struct rlimit rlim;
 | 
			
		||||
 | 
			
		||||
	if (getrlimit(RLIMIT_STACK, &rlim) == 0) {
 | 
			
		||||
	    unsigned int space = rlim.rlim_cur/5;
 | 
			
		||||
	    size_t space = (size_t)(rlim.rlim_cur/5);
 | 
			
		||||
 | 
			
		||||
	    if (space > 1024*1024) space = 1024*1024;
 | 
			
		||||
	    native_main_thread.stack_maxsize = rlim.rlim_cur - space;
 | 
			
		||||
	    native_main_thread.stack_maxsize = (size_t)rlim.rlim_cur - space;
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue