File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1469,12 +1469,13 @@ static void zend_gc_root_tmpvars(void);
1469
1469
1470
1470
ZEND_API int zend_gc_collect_cycles (void )
1471
1471
{
1472
- int count = 0 ;
1472
+ int total_count = 0 ;
1473
1473
bool should_rerun_gc = 0 ;
1474
1474
bool did_rerun_gc = 0 ;
1475
1475
1476
1476
rerun_gc :
1477
1477
if (GC_G (num_roots )) {
1478
+ int count ;
1478
1479
gc_root_buffer * current , * last ;
1479
1480
zend_refcounted * p ;
1480
1481
uint32_t gc_flags = 0 ;
@@ -1498,7 +1499,7 @@ ZEND_API int zend_gc_collect_cycles(void)
1498
1499
gc_scan_roots (& stack );
1499
1500
1500
1501
GC_TRACE ("Collecting roots" );
1501
- count + = gc_collect_roots (& gc_flags , & stack );
1502
+ count = gc_collect_roots (& gc_flags , & stack );
1502
1503
1503
1504
if (!GC_G (num_roots )) {
1504
1505
/* nothing to free */
@@ -1652,6 +1653,7 @@ ZEND_API int zend_gc_collect_cycles(void)
1652
1653
1653
1654
GC_TRACE ("Collection finished" );
1654
1655
GC_G (collected ) += count ;
1656
+ total_count += count ;
1655
1657
GC_G (gc_active ) = 0 ;
1656
1658
}
1657
1659
@@ -1668,7 +1670,7 @@ ZEND_API int zend_gc_collect_cycles(void)
1668
1670
finish :
1669
1671
zend_get_gc_buffer_release ();
1670
1672
zend_gc_root_tmpvars ();
1671
- return count ;
1673
+ return total_count ;
1672
1674
}
1673
1675
1674
1676
ZEND_API void zend_gc_get_status (zend_gc_status * status )
You can’t perform that action at this time.
0 commit comments