mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Disable read barrier on explicit compaction request
We don't need a read barrier when the user calls `GC.compact` because we don't allow allocations during GC, and all references should be "live"
This commit is contained in:
		
							parent
							
								
									b4dd7310ca
								
							
						
					
					
						commit
						490b57783d
					
				
				
				Notes:
				
					git
				
				2020-11-25 05:38:36 +09:00 
				
			
			
			
		
		
					 2 changed files with 29 additions and 5 deletions
				
			
		
							
								
								
									
										3
									
								
								gc.rb
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								gc.rb
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -199,8 +199,7 @@ module GC
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  def self.compact
 | 
			
		||||
    Primitive.gc_start_internal true, true, true, true
 | 
			
		||||
    Primitive.gc_compact_stats
 | 
			
		||||
    Primitive.gc_compact
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  # call-seq:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue