* Memory related Defines
******************************************************************************/
/* Allocate function */
+#ifdef MEM_SIZE_CHECK
+#define RLC_MEMORY_ALLOC_SIZE_LOG(_line, _func, _size) \
+{\
+ DU_LOG("\nRLC line = %d, func = %s, _size= %d ", _line, _func, _size); \
+}
+#else
+#define RLC_MEMORY_ALLOC_SIZE_LOG(_line, _func, _size) {}
+#endif
+
#ifdef ODU_MEMORY_DEBUG_LOG
#define RLC_MEM_LOG(_macro, _file, _line, _func, _size, _datPtr)\
{\
#define RLC_ALLOC(_cb,_buf, _size) \
{ \
+ RLC_MEMORY_ALLOC_SIZE_LOG(__LINE__, __FUNCTION__, _size); \
if (SGetSBuf(_cb->init.region, _cb->init.pool, (Data **)&_buf, \
(Size) _size) == ROK) \
{ \
#define RLC_ALLOC_SHRABL_BUF_WC(_region, _pool,_buf, _size) \
{ \
+ RLC_MEMORY_ALLOC_SIZE_LOG(__LINE__, __FUNCTION__, _size); \
if(SGetStaticBuffer(_region, _pool, (Data **)&_buf, \
(Size) _size, 0)==ROK) \
{\
#define RLC_ALLOC_SHRABL_BUF(_region, _pool,_buf, _size) \
{ \
+ RLC_MEMORY_ALLOC_SIZE_LOG(__LINE__, __FUNCTION__, _size); \
if (SGetStaticBuffer(_region, _pool, (Data **)&_buf, \
(Size) _size, 0) == ROK) \
{ \
#define RLC_ALLOC_WC(_cb,_buf, _size) \
{\
+ RLC_MEMORY_ALLOC_SIZE_LOG(__LINE__, __FUNCTION__, _size); \
if(SGetSBuf(_cb->init.region, _cb->init.pool, (Data **)&_buf, (Size) _size) == ROK)\
{\
RLC_MEM_LOG("RLC,ALLOC_WC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\
#define RLC_SHRABL_STATIC_BUF_ALLOC(_region, _pool, _buf, _size) \
{ \
+ RLC_MEMORY_ALLOC_SIZE_LOG(__LINE__, __FUNCTION__, _size); \
SGetStaticBuffer(_region, _pool, (Data **)&_buf, \
(Size) _size, 0); \
RLC_MEM_LOG("RLC,SHRABL_STATIC_BUF_ALLOC", __FILE__, __LINE__, __FUNCTION__, _size, _buf);\