File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1599,15 +1599,11 @@ gc_should_collect(GCState *gcstate)
15991599    if  (count  <= threshold  ||  threshold  ==  0  ||  !gcstate -> enabled ) {
16001600        return  false;
16011601    }
1602-     #if  1  // disable to force more frequent collections 
16031602    // Avoid quadratic behavior by scaling threshold to the number of live 
16041603    // objects. A few tests rely on immediate scheduling of the GC so we ignore 
16051604    // the scaled threshold if generations[1].threshold is set to zero. 
1606-     if  (count  <  gcstate -> long_lived_total  / 4  &&  gcstate -> old [0 ].threshold  !=  0 ) {
1607-         return  false;
1608-     }
1609-     #endif 
1610-     return  true;
1605+     return  (count  >  gcstate -> long_lived_total  / 4  || 
1606+             gcstate -> old [0 ].threshold  ==  0 );
16111607}
16121608
16131609static  void 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments