X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_utils.h;h=98f0338996aef76f708189073666847c1b6c97f9;hb=fc7d3ce9647a7da04f5a67fa34419076069defc1;hp=e98aa43ad237662e987ffe9b028b4c2628132608;hpb=6418f704150760e4d8a885cda583e4010a406152;p=o-du%2Fl2.git diff --git a/src/du_app/du_utils.h b/src/du_app/du_utils.h index e98aa43ad..98f033899 100644 --- a/src/du_app/du_utils.h +++ b/src/du_app/du_utils.h @@ -44,6 +44,16 @@ /* allocate and zero out a static buffer */ +#ifdef MEM_SIZE_CHECK +#define DU_APP_MEMORY_ALLOC_SIZE_LOG(_line, _func, _size) \ +{\ + DU_LOG("\n DUAPP line = %d, func = %s, _size= %d ", _line, _func, _size); \ +} +#else +#define DU_APP_MEMORY_ALLOC_SIZE_LOG(_line, _func, _size) {} +#endif + + #ifdef ODU_MEMORY_DEBUG_LOG #define DU_MEM_LOG(_macro, _file, _line, _func, _size, _datPtr)\ {\ @@ -56,6 +66,7 @@ #define DU_ALLOC(_datPtr, _size) \ { \ + DU_APP_MEMORY_ALLOC_SIZE_LOG(__LINE__, __FUNCTION__, _size); \ int _ret; \ _ret = SGetSBuf(DU_APP_MEM_REGION, DU_POOL, \ (Data **)&_datPtr, _size); \ @@ -83,6 +94,7 @@ * during inter-layer communication */ #define DU_ALLOC_SHRABL_BUF(_buf, _size) \ { \ + DU_APP_MEMORY_ALLOC_SIZE_LOG(__LINE__, __FUNCTION__, _size); \ if(SGetStaticBuffer(DU_APP_MEM_REGION, DU_POOL, \ (Data **)&_buf, (Size) _size, 0) == ROK) \ { \