@@ -205,7 +205,6 @@ int under_pressure = 0;
205205// Full collection heuristics
206206static int64_t live_bytes = 0 ;
207207static int64_t promoted_bytes = 0 ;
208- static int64_t last_live_bytes = 0 ; // live_bytes at last collection
209208#ifdef __GLIBC__
210209// maxrss at last malloc_trim
211210static int64_t last_trim_maxrss = 0 ;
@@ -3362,15 +3361,14 @@ static int _jl_gc_collect(jl_ptls_t ptls, jl_gc_collection_t collection) JL_NOTS
33623361#endif
33633362
33643363 _report_gc_finished (pause , gc_num .freed , sweep_full , recollect , live_bytes );
3365- uint64_t max_memory = last_live_bytes + gc_num .allocd ;
3364+ uint64_t max_memory = live_bytes + gc_num .allocd ;
33663365 if (max_memory > gc_num .max_memory ) {
33673366 gc_num .max_memory = max_memory ;
33683367 }
33693368 gc_final_pause_end (gc_start_time , gc_end_time );
33703369 gc_time_sweep_pause (gc_end_time , gc_num .allocd , live_bytes ,
33713370 gc_num .freed , sweep_full );
33723371 gc_num .full_sweep += sweep_full ;
3373- last_live_bytes = live_bytes ;
33743372 live_bytes += - gc_num .freed + gc_num .allocd ;
33753373 jl_timing_counter_dec (JL_TIMING_COUNTER_HeapSize , gc_num .freed );
33763374
0 commit comments