From a85288566bb7786856a058db44f0b4bf6c3d90e9 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 22 Feb 2018 13:51:20 +0100 Subject: [PATCH] print summary about allocated buffers when buffer pool is full --- lib/include/srslte/common/buffer_pool.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/include/srslte/common/buffer_pool.h b/lib/include/srslte/common/buffer_pool.h index e48144b6f..4edc50fc6 100644 --- a/lib/include/srslte/common/buffer_pool.h +++ b/lib/include/srslte/common/buffer_pool.h @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include /******************************************************************************* @@ -76,8 +78,13 @@ public: { printf("%d buffers in queue\n", (int) used.size()); #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED + std::map buffer_cnt; for (uint32_t i=0;idebug_name)?used[i]->debug_name:"Undefined"); + buffer_cnt[strlen(used[i]->debug_name)?used[i]->debug_name:"Undefined"]++; + } + std::map::iterator it; + for (it = buffer_cnt.begin(); it != buffer_cnt.end(); it++) { + printf(" - %dx %s\n", it->second, it->first.c_str()); } #endif }