← Commit list

c1b5c3524

Denys Vlasenko
Denys Vlasenko
2025-08-05
SUCCESS Duration: 158s

Subject

top: do not rescan processes on second 's'

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

procps/top.c+3 -1
@@ -1056,8 +1056,10 @@ static unsigned handle_input(unsigned scan_mask, duration_t interval)
}
# if ENABLE_FEATURE_TOPMEM
if (c == 's') {
- scan_mask = TOPMEM_MASK;
sort_field = (sort_field + 1) % NUM_SORT_FIELD;
+ if (scan_mask == TOPMEM_MASK)
+ return NO_RESCAN_MASK;
+ scan_mask = TOPMEM_MASK;
free(prev_hist);
prev_hist = NULL;
prev_hist_count = 0;