mirror of https://github.com/PentHertz/srsLTE.git
print summary about allocated buffers when buffer pool is full
This commit is contained in:
parent
3dddae0566
commit
a85288566b
|
@ -30,6 +30,8 @@
|
|||
#include <pthread.h>
|
||||
#include <vector>
|
||||
#include <stack>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -76,8 +78,13 @@ public:
|
|||
{
|
||||
printf("%d buffers in queue\n", (int) used.size());
|
||||
#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED
|
||||
std::map<std::string, uint32_t> buffer_cnt;
|
||||
for (uint32_t i=0;i<used.size();i++) {
|
||||
printf("%s\n", strlen(used[i]->debug_name)?used[i]->debug_name:"Undefined");
|
||||
buffer_cnt[strlen(used[i]->debug_name)?used[i]->debug_name:"Undefined"]++;
|
||||
}
|
||||
std::map<std::string, uint32_t>::iterator it;
|
||||
for (it = buffer_cnt.begin(); it != buffer_cnt.end(); it++) {
|
||||
printf(" - %dx %s\n", it->second, it->first.c_str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue