diff --git a/lib/include/srslte/common/buffer_pool.h b/lib/include/srslte/common/buffer_pool.h index bfd021d1b..fa497c352 100644 --- a/lib/include/srslte/common/buffer_pool.h +++ b/lib/include/srslte/common/buffer_pool.h @@ -204,9 +204,17 @@ public: b->reset(); if (!pool->deallocate(b)) { if (log) { +#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED log->error("Deallocating PDU: Addr=0x%lx, name=%s not found in pool\n", (uint64_t) b, b->debug_name); +#else + log->error("Deallocating PDU: Addr=0x%lx\n", (uint64_t) b); +#endif } else { +#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED printf("Error deallocating PDU: Addr=0x%lx, name=%s not found in pool\n", (uint64_t) b, b->debug_name); +#else + printf("Error deallocating PDU: Addr=0x%lx\n", (uint64_t) b); +#endif } } b = NULL; diff --git a/lib/include/srslte/common/common.h b/lib/include/srslte/common/common.h index 27e8bf2a9..eb157f368 100644 --- a/lib/include/srslte/common/common.h +++ b/lib/include/srslte/common/common.h @@ -65,7 +65,7 @@ #define SRSLTE_MAX_BUFFER_SIZE_BYTES (SRSLTE_MAX_BUFFER_SIZE_BITS/8) #define SRSLTE_BUFFER_HEADER_OFFSET 1020 -#define SRSLTE_BUFFER_POOL_LOG_ENABLED +//#define SRSLTE_BUFFER_POOL_LOG_ENABLED #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED #define pool_allocate (pool->allocate(__PRETTY_FUNCTION__)) @@ -73,6 +73,7 @@ #define SRSLTE_BUFFER_POOL_LOG_NAME_LEN 128 #else #define pool_allocate (pool->allocate()) +#define pool_allocate_blocking (pool->allocate(NULL, true)) #endif #define ZERO_OBJECT(x) memset(&(x), 0x0, sizeof((x))) diff --git a/srsenb/hdr/phy/prach_worker.h b/srsenb/hdr/phy/prach_worker.h index c1c4c978c..45ca75745 100644 --- a/srsenb/hdr/phy/prach_worker.h +++ b/srsenb/hdr/phy/prach_worker.h @@ -73,7 +73,6 @@ private: cf_t samples[sf_buffer_sz]; uint32_t nof_samples; uint32_t tti; - char debug_name[SRSLTE_BUFFER_POOL_LOG_NAME_LEN]; }; srslte::buffer_pool buffer_pool; srslte::block_queue pending_buffers;