#define EVENT_RIC_DATA 10
/* 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)\
+{\
+ printf("\n%s,=== %s +%d, %s, %lu, %p \n", \
+ _macro, _file, _line, _func, (uint64_t)_size, _datPtr); \
+}
+#else
+#define DU_MEM_LOG(_macro, _file, _line, _func, _size, _dataPtr) {}
+#endif
+
#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); \
- if(_ret == ROK) \
+ if(_ret == ROK) \
+ {\
+ DU_MEM_LOG("DU,ALLOC", __FILE__, __LINE__, __FUNCTION__, _size, _datPtr);\
memset(_datPtr, 0, _size); \
+ }\
else \
_datPtr = NULLP; \
}
/* free a static buffer */
#define DU_FREE(_datPtr, _size) \
- if(_datPtr) \
+{ \
+ if(_datPtr != NULLP) \
+ { \
+ DU_MEM_LOG("DU,FREE", __FILE__, __LINE__, __FUNCTION__, _size, _datPtr);\
SPutSBuf(DU_APP_MEM_REGION, DU_POOL, \
- (Data *)_datPtr, _size);
-
+ (Data *)_datPtr, _size); \
+ _datPtr = NULLP; \
+ } \
+}
/* Allocate shared memory to be used for LWLC
* 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) \
{ \
+ DU_MEM_LOG("DU,ALLOC_SHRABL_BUF", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\
memset((_buf), 0, _size); \
} \
else \
{ \
if (_buf != NULLP) \
{ \
+ DU_MEM_LOG("DU,FREE_SHRABL_BUF", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\
(Void) SPutStaticBuffer(_region, _pool, \
(Data *) _buf, (Size) _size, 0); \
_buf = NULLP; \
}
-void fillStartSymbolAndLen(uint8_t numRsrcAlloc, PdschConfig *pdschCfg, PuschCfg *puschCfg)
-;
+void fillStartSymbolAndLen(uint8_t numRsrcAlloc, PdschConfig *pdschCfg, PuschCfg *puschCfg);
+uint8_t duAddNodeToLList(CmLListCp *llist, void *blockToAdd, CmLList *currNode);
+uint8_t duDelNodeFromLList(CmLListCp *llist, CmLList *node);
+
+DuPagUeRecord* handlePageUeLL(uint16_t pagUeId, uint64_t sTmsi, CmLListCp *pageUeLL, ActionTypeLL action);
+DuPagUeList* handlePageInfoLL(uint16_t pf, uint8_t i_s, CmLListCp *pagInfoLL, ActionTypeLL action);
+DuPagInfoList* findPagingInfoFromMap(uint16_t pf, CmHashListCp *pagingInfoMap);
+#if 0
+void printPageList(CmHashListCp *pagingInfoMap);
+#endif
/**********************************************************************
End of file