#define DU_POOL 1
#define RLC_POOL 1
#define MAC_POOL 1
+#define MAX_SLIV_CONFIG_IDX 105
/* Events */
#define EVTCFG 0
#define EVENT_RIC_DATA 10
/* allocate and zero out a static buffer */
+
+#ifdef ODU_MEMORY_DEBUG_LOG
+#define DU_MEM_LOG(_macro, _file, _line, _func, _size, _datPtr)\
+{\
+ printf("\n%s=== %s +%d, %s, %d, %p\n", \
+ _macro, _file, _line, _func, _size, _datPtr); \
+}
+#else
+#define DU_MEM_LOG(_macro, _file, _line, _func, _size, _dataPtr) {}
+#endif
+
#define DU_ALLOC(_datPtr, _size) \
{ \
int _ret; \
_ret = SGetSBuf(DU_APP_MEM_REGION, DU_POOL, \
(Data **)&_datPtr, _size); \
- if(_ret == ROK) \
- memset((uint8_t*)_datPtr, 0, _size); \
+ 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) \
if(SGetStaticBuffer(DU_APP_MEM_REGION, DU_POOL, \
(Data **)&_buf, (Size) _size, 0) == ROK) \
{ \
- memset((uint8_t *)(_buf), 0, _size); \
+ 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; \
_pst.intfVer = 0; \
}
+
+void fillStartSymbolAndLen(uint8_t numRsrcAlloc, PdschConfig *pdschCfg, PuschCfg *puschCfg);
/**********************************************************************
End of file
**********************************************************************/