From 874fa033d117a3e9931245cb9e82836a4abc0425 Mon Sep 17 00:00:00 2001 From: Sergej Schumilo Date: Thu, 3 Aug 2023 12:00:50 +0200 Subject: [PATCH] avoid unnecessary bitmap SHM resize --- nyx/helpers.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nyx/helpers.c b/nyx/helpers.c index be96cf63d3..20e7203402 100644 --- a/nyx/helpers.c +++ b/nyx/helpers.c @@ -121,6 +121,11 @@ static void resize_coverage_bitmap(uint32_t new_bitmap_size) { uint32_t new_bitmap_shm_size = new_bitmap_size; + /* check if we really need to resize the shared memory buffer */ + if (new_bitmap_size == GET_GLOBAL_STATE()->shared_bitmap_size) { + return; + } + if (new_bitmap_shm_size % 64 > 0) { new_bitmap_shm_size = ((new_bitmap_shm_size + 64) >> 6) << 6; }