summaryrefslogtreecommitdiff
path: root/ot_stats.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2024-04-10 01:13:50 +0200
committerDirk Engling <erdgeist@erdgeist.org>2024-04-10 01:13:59 +0200
commit52d9829f81264de99055fb5c85e7e05915997aa6 (patch)
tree04d2505690f907a2e3e94e7c119d0d6944be2d40 /ot_stats.c
parent1b976863fcbe03d0877543597baa2e662baa8752 (diff)
Reserve enough memory to hold all peer timeout buckets
Diffstat (limited to 'ot_stats.c')
-rw-r--r--ot_stats.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ot_stats.c b/ot_stats.c
index 2d45346..0fd281d 100644
--- a/ot_stats.c
+++ b/ot_stats.c
@@ -627,7 +627,9 @@ static void stats_make( int *iovec_entries, struct iovec **iovector, ot_tasktype
627 r = iovec_fix_increase_or_free( iovec_entries, iovector, r, 4 * OT_STATS_TMPSIZE ); 627 r = iovec_fix_increase_or_free( iovec_entries, iovector, r, 4 * OT_STATS_TMPSIZE );
628 if( !r ) return; 628 if( !r ) return;
629 r += stats_top_txt( r, 100 ); break; 629 r += stats_top_txt( r, 100 ); break;
630 case TASK_STATS_EVERYTHING: r += stats_return_everything( r ); break; 630 case TASK_STATS_EVERYTHING: r = iovec_fix_increase_or_free( iovec_entries, iovector, r, OT_STATS_TMPSIZE + 64 * OT_PEER_TIMEOUT );
631 if( !r ) return;
632 r += stats_return_everything( r ); break;
631#ifdef WANT_SPOT_WOODPECKER 633#ifdef WANT_SPOT_WOODPECKER
632 case TASK_STATS_WOODPECKERS: r += stats_return_woodpeckers( r, 128 ); break; 634 case TASK_STATS_WOODPECKERS: r += stats_return_woodpeckers( r, 128 ); break;
633#endif 635#endif