From 52d9829f81264de99055fb5c85e7e05915997aa6 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Wed, 10 Apr 2024 01:13:50 +0200 Subject: Reserve enough memory to hold all peer timeout buckets --- ot_stats.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 r = iovec_fix_increase_or_free( iovec_entries, iovector, r, 4 * OT_STATS_TMPSIZE ); if( !r ) return; r += stats_top_txt( r, 100 ); break; - case TASK_STATS_EVERYTHING: r += stats_return_everything( r ); break; + case TASK_STATS_EVERYTHING: r = iovec_fix_increase_or_free( iovec_entries, iovector, r, OT_STATS_TMPSIZE + 64 * OT_PEER_TIMEOUT ); + if( !r ) return; + r += stats_return_everything( r ); break; #ifdef WANT_SPOT_WOODPECKER case TASK_STATS_WOODPECKERS: r += stats_return_woodpeckers( r, 128 ); break; #endif -- cgit v1.2.3