if(((uint64_t)(address - regMemLeakInfo.regStartAddr[region]) & regMinBktSzInfo[region].minBktSzMins1) !=0)
{
- printf("address in InsertToT2kMemLeakInfo is %ld size = %d file is %s line is %d \n", address, size, fileName, lineNo);
+ DU_LOG("\nINFO --> address in InsertToT2kMemLeakInfo is %ld size = %d file is %s line is %d \n", address, size, fileName, lineNo);
}
leakInfo = (((T2kMeamLeakInfo*)(regMemLeakInfo.gMemLeakInfo[region])) + index1);
leakInfo->prevRemLineNo = 0;
leakInfo->prevRemFileName = '\0';
- //printf("InsertToT2kMemLeakInfo the adress from List Address = %x, index1 = %d from File=%s, line=%d \n",address,index1,fileName,lineNo);
+ //DU_LOG("\nINFO --> InsertToT2kMemLeakInfo the adress from List Address = %x, index1 = %d \
+ from File=%s, line=%d \n",address,index1,fileName,lineNo);
if(smallTick++ == 4096)
{
smallTick = 0;
}
else
{
- printf("Something is wrong, trying to insert %ld index1 = %d file is %s line is %d \n",address, index1, fileName, lineNo);
- printf("Address present :%ld, from File:%s, Line:%d, Size:%d, Age:%d",
+ DU_LOG("\nERROR --> Something is wrong, trying to insert %ld index1 = %d file is %s line is %d \n",address, index1, fileName, lineNo);
+ DU_LOG("\nINFO --> Address present :%ld, from File:%s, Line:%d, Size:%d, Age:%d",
leakInfo->address, leakInfo->fileName,
leakInfo->lineNo, leakInfo->size,
leakInfo->age);
if(index1 >= T2K_MEM_LEAK_INFO_TABLE_SIZE)
{
- printf("index1 out of range = %d address is %ld file = %s line = %d. We are going to crash!!!\n",
+ DU_LOG("\nERROR --> index1 out of range = %d address is %ld file = %s line = %d. We are going to crash!!!\n",
index1,
address,
file,
}
else
{
- printf("Something is wrong, trying to remove %ld index1 = %d from File=%s, line=%d address present is %ld region%d \n",address, index1, file,line,leakInfo->address,region);
+ DU_LOG("\nERROR --> Something is wrong, trying to remove %ld index1 = %d from File=%s, line=%d address present is %ld region%d \n",address, index1, file,line,leakInfo->address,region);
- printf("\n Last Del file %s line %d\n",leakInfo->lastDelFileName,
+ DU_LOG("\nINFO --> Last Del file %s line %d\n",leakInfo->lastDelFileName,
leakInfo->lastDelLineNum);
if(leakInfo->prevRemFileName != NULLP)
{
- printf("Previous File:%s, Previous Line:%d\n",
+ DU_LOG("\nINFO --> Previous File:%s, Previous Line:%d\n",
leakInfo->prevRemFileName, leakInfo->prevRemLineNo);
}
}
if(fp == NULL)
{
- printf("Could not open file for dumping mem leak info\n");
+ DU_LOG("\nERROR --> Could not open file for dumping mem leak info\n");
return;
}
for(reg=0; reg <regMemLeakInfo.numActvRegions; reg++)
* File: cm_mem.c
*
*/
-#ifdef ANSI
-S16 cmMmRegInit
-(
-Region region,
-CmMmRegCb *regCb,
-CmMmRegCfg *cfg
-)
-#else
-S16 cmMmRegInit(region, regCb, cfg)
-Region region;
-CmMmRegCb *regCb;
-CmMmRegCfg *cfg;
-#endif
+S16 cmMmRegInit(Region region,CmMmRegCb *regCb,CmMmRegCfg *cfg)
{
Data *memAddr;
- uint16_t bktIdx;
- uint16_t lstMapIdx;
+ uint16_t bktIdx;
+ uint16_t lstMapIdx;
#if (ERRCLASS & ERRCLS_INT_PAR)
Size lstQnSize;
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
/* Initialize the hast list to maintain the SSI memory information for Broadcom */
offset = (uint16_t)((PTR)(&ptrHdr.ent) - (PTR) &ptrHdr);
- printf("###########offset is %d region %d\n", offset, region);
+ DU_LOG("\nINFO --> offset is %d region %d\n", offset, region);
if(cmHashListInit(®Cb->brdcmSsiLstCp, 1000, offset, FALSE,
CM_HASH_KEYTYPE_UINT32_MOD, region, 0) != ROK)
{
* File: cm_mem.c
*
*/
-#ifdef ANSI
-S16 cmMmRegDeInit
-(
-CmMmRegCb *regCb
-)
-#else
-S16 cmMmRegDeInit(regCb)
-CmMmRegCb *regCb;
-#endif
+S16 cmMmRegDeInit(CmMmRegCb *regCb)
{
uint16_t bktIdx;
/* cm_mem_c_001.main_15 : Additions */
#ifdef SS_HISTOGRAM_SUPPORT
#ifdef SSI_DEBUG_LEVEL1
-#ifdef ANSI
static S16 cmAlloc
(
-Void *regionCb,
-Size *size,
+Void *regionCb,
+Size *size,
uint32_t flags,
-Data **ptr,
+Data **ptr,
uint32_t memType,
uint32_t line,
uint8_t *fileName,
uint8_t entId,
-Bool hstReg
+Bool hstReg
)
#else
-static S16 cmAlloc(regionCb, size, flags, ptr, memType, line, fileName, entId, hstReg)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-uint32_t memType;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-Bool hstReg;
-#endif
-#else
-#ifdef ANSI
static S16 cmAlloc
(
-Void *regionCb,
-Size *size,
+Void *regionCb,
+Size *size,
uint32_t flags,
-Data **ptr,
+Data **ptr,
uint32_t line,
-uint8_t *fileName,
+uint8_t *fileName,
uint8_t entId,
-Bool hstReg
+Bool hstReg
)
-#else
-static S16 cmAlloc(regionCb, size, flags, ptr, line, fileName, entId, hstReg)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-Bool hstReg;
-#endif
#endif /* SSI_DEBUG_LEVEL1 */
#else
#ifdef SS_LIGHT_MEM_LEAK_STS
-#ifdef ANSI
static S16 cmAlloc
(
-Void *regionCb,
-Size *size,
+Void *regionCb,
+Size *size,
uint32_t flags,
-Data **ptr,
+Data **ptr,
uint32_t memType,
uint32_t lineNo,
-uint8_t *funcName
+uint8_t *funcName
)
-#else
-static S16 cmAlloc(regionCb, size, flags, ptr ,memType, lineNo, funcName)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-uint32_t memType;
-uint32_t lineNo;
-uint8_t *funcName;
-#endif
#else /*SS_LIGHT_MEM_LEAK_STS */
#ifdef SSI_DEBUG_LEVEL1
-#ifdef ANSI
static S16 cmAlloc
(
-Void *regionCb,
-Size *size,
+Void *regionCb,
+Size *size,
uint32_t flags,
-Data **ptr,
+Data **ptr,
uint32_t memType
)
#else
-static S16 cmAlloc(regionCb, size, flags, ptr, memType)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-uint32_t memType;
-#endif
-#else
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
-#ifdef ANSI
static S16 cmAlloc
(
-Void *regionCb,
-Size *size,
+Void *regionCb,
+Size *size,
uint32_t flags,
-Data **ptr,
+Data **ptr,
uint32_t memType
)
#else
-static S16 cmAlloc(regionCb, size, flags, ptr, memType)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-uint32_t memType;
-#endif
-#else
#ifdef T2K_MEM_LEAK_DBG
static S16 cmAlloc
(
- Void *regionCb,
- Size *size,
+ Void *regionCb,
+ Size *size,
uint32_t flags,
- Data **ptr ,
- char* file,
- uint32_t line
+ Data **ptr,
+ char* file,
+ uint32_t line
)
#else
-#ifdef ANSI
static S16 cmAlloc
(
-Void *regionCb,
-Size *size,
+Void *regionCb,
+Size *size,
uint32_t flags,
-Data **ptr
+Data **ptr
)
-#else
-static S16 cmAlloc(regionCb, size, flags, ptr)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-#endif
#endif
#endif /* BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1 */
#endif /* SSI_DEBUG_LEVEL1 */
{
/* cm_mem_c_001.main_26 : Fixes for Compilation Warnings */
#ifndef USE_PURE
- uint16_t idx;
+ uint16_t idx;
CmMmBkt *bkt;
#endif
CmMmRegCb *regCb;
/* Initialize the elements with 0xAB */
memset(*ptr, 0xAB, *size);
#endif
-// printf("Pointer allocated %8p size %d\n", *ptr, *size);
+// DU_LOG("\nINFO --> Pointer allocated %8p size %d\n", *ptr, *size);
/* Store this pointer in hash list */
if ((bkt->nextBlk) && *ptr)
#elif SS_LIGHT_MEM_LEAK_STS
if (g_overused[bktIdx] == 0 && OVERUSED(bkt))
{
g_overused[bktIdx] = 1;
- /*printf("cmAlloc: bktIdx %u overused %u numAlloc %u\n", bktIdx, g_overused[bktIdx], bkt->numAlloc); */
+ /*DU_LOG("\nINFO --> cmAlloc: bktIdx %u overused %u numAlloc %u\n", bktIdx, g_overused[bktIdx], bkt->numAlloc); */
}
}
#endif
/* cm_mem_c_001.main_15 : Additions */
#ifdef SS_LIGHT_MEM_LEAK_STS
-#ifdef ANSI
static S16 cmFree
(
-Void *regionCb,
-Data *ptr,
-Size size,
-uint32_t lineNo,
-uint8_t *funcName
+Void *regionCb,
+Data *ptr,
+Size size,
+uint32_t lineNo,
+uint8_t *funcName
)
-#else
-static S16 cmFree(regionCb, ptr, size, lineNo, funcName)
-Void *regionCb;
-Data *ptr;
-Size size;
-uint32_t lineNo;
-uint8_t *funcName;
-#endif
#else /*SS_LIGHT_MEM_LEAK_STS */
#ifdef SS_HISTOGRAM_SUPPORT
-#ifdef ANSI
static S16 cmFree
(
-Void *regionCb,
-Data *ptr,
-Size size,
-uint32_t line,
-uint8_t *fileName,
-uint8_t entId,
-Bool hstReg
+Void *regionCb,
+Data *ptr,
+Size size,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId,
+Bool hstReg
)
-#else
-static S16 cmFree(regionCb, ptr, size, line, fileName, entId, hstReg)
-Void *regionCb;
-Data *ptr;
-Size size;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-Bool hstReg;
-#endif
#else
#ifdef T2K_MEM_LEAK_DBG
static S16 cmFree
(
- Void *regionCb,
- Data *ptr,
- Size size,
- char* file,
- uint32_t line
+Void *regionCb,
+Data *ptr,
+Size size,
+char* file,
+uint32_t line
)
#else /* T2K_MEM_LEAK_DBG */
-#ifdef ANSI
static S16 cmFree
(
Void *regionCb,
Data *ptr,
Size size
)
-#else
-static S16 cmFree(regionCb, ptr, size)
-Void *regionCb;
-Data *ptr;
-Size size;
-#endif
#endif
/* cm_mem_c_001.main_15 : Additions */
#endif /* SS_HISTOGRAM_SUPPORT */
size(%d) %8p, Bucket Id:%03d\n",
size, ptrHdr->requestedSize, ptr, regCb->mapTbl[idx].bktIdx);
#endif
- printf("Passed size (%d) does not match with allocated \
+ DU_LOG("\nERROR --> Passed size (%d) does not match with allocated \
size(%d) %8p, Bucket Id:%03d\n",
size, ptrHdr->requestedSize, ptr, regCb->mapTbl[idx].bktIdx);
abort();
}
/* Validate the tail part to see if there is any over run */
-// printf("Pointer free request %8p, size %d\n", ptr, size);
+// DU_LOG("\nINFO --> Pointer free request %8p, size %d\n", ptr, size);
#endif
/* validate the block to be freed for trampling */
return (RTRAMPLINGNOK);
}
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
- printf("Memory signature is invalid\n");
+ DU_LOG("\nERROR --> Memory signature is invalid\n");
abort();
#endif
}
(Void) SUnlock(&(bkt->bktLock));
#endif
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
- printf("Attempt to double deallocate memory at: %8p, Bucket Id:%03d,\
+ DU_LOG("\nERROR --> Attempt to double deallocate memory at: %8p, Bucket Id:%03d,\
size %u bytes \n", ptr, regCb->mapTbl[idx].bktIdx, bkt->size);
abort();
#endif
/* cm_mem_c_001.main_15 : Additions */
#ifdef SS_HISTOGRAM_SUPPORT
#ifdef SSI_DEBUG_LEVEL1
-#ifdef ANSI
S16 cmAllocNL
(
Void *regionCb,
Size *size,
-uint32_t flags,
+uint32_t flags,
Data **ptr,
-uint32_t memType,
-uint32_t line,
-uint8_t *fileName,
-uint8_t entId,
+uint32_t memType,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId,
Bool hstReg
)
#else
-S16 cmAllocNL(regionCb, size, flags, ptr, memType,
- line, fileName, entId, hstReg)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-uint32_t memType;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-Bool hstReg;
-#endif
-#else
-#ifdef ANSI
S16 cmAllocNL
(
Void *regionCb,
Size *size,
-uint32_t flags,
+uint32_t flags,
Data **ptr,
-uint32_t line,
-uint8_t *fileName,
-uint8_t entId,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId,
Bool hstReg
)
-#else
-S16 cmAllocNL(regionCb, size, flags, ptr, line,
- fileName, entId, hstReg)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-Bool hstReg;
-#endif
#endif /* SSI_DEBUG_LEVEL1 */
#else
#ifdef SS_LIGHT_MEM_LEAK_STS
-#ifdef ANSI
S16 cmAllocNL
(
Void *regionCb,
uint32_t lineNo,
uint8_t *funcName
)
-#else
-S16 cmAllocNL(regionCb, size, flags, ptr ,memType, lineNo, funcName)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-uint32_t memType;
-uint32_t lineNo;
-uint8_t *funcName;
-#endif
#else /*SS_LIGHT_MEM_LEAK_STS */
#ifdef SSI_DEBUG_LEVEL1
-#ifdef ANSI
S16 cmAllocNL
(
Void *regionCb,
Size *size,
-uint32_t flags,
+uint32_t flags,
Data **ptr,
-uint32_t memType
+uint32_t memType
)
#else
-S16 cmAllocNL(regionCb, size, flags, ptr, memType)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-uint32_t memType;
-#endif
-#else
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
-#ifdef ANSI
S16 cmAllocNL
(
Void *regionCb,
uint32_t memType
)
#else
-S16 cmAllocNL(regionCb, size, flags, ptr, memType)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-uint32_t memType;
-#endif
-#else
-#ifdef ANSI
S16 cmAllocNL
(
Void *regionCb,
uint32_t flags,
Data **ptr
)
-#else
-S16 cmAllocNL(regionCb, size, flags, ptr)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-#endif
#endif /* BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1 */
#endif /* SSI_DEBUG_LEVEL1 */
/* cm_mem_c_001.main_15: Additions */
/* cm_mem_c_001.main_15 : Additions */
#ifdef SS_LIGHT_MEM_LEAK_STS
-#ifdef ANSI
S16 cmFreeNL
(
Void *regionCb,
uint32_t lineNo,
uint8_t *funcName
)
-#else
-S16 cmFreeNL(regionCb, ptr, size, lineNo, funcName)
-Void *regionCb;
-Data *ptr;
-Size size;
-uint32_t lineNo;
-uint8_t *funcName;
-#endif
#else /*SS_LIGHT_MEM_LEAK_STS */
#ifdef SS_HISTOGRAM_SUPPORT
-#ifdef ANSI
S16 cmFreeNL
(
Void *regionCb,
uint8_t entId,
Bool hstReg
)
-#else
-S16 cmFreeNL(regionCb, ptr, size, line, fileName, entId, hstReg)
-Void *regionCb;
-Data *ptr;
-Size size;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-Bool hstReg;
-#endif
-
#else
-#ifdef ANSI
S16 cmFreeNL
(
Void *regionCb,
Data *ptr,
Size size
)
-#else
-S16 cmFreeNL(regionCb, ptr, size)
-Void *regionCb;
-Data *ptr;
-Size size;
-#endif
/* cm_mem_c_001.main_15 : Additions */
#endif /* SS_HISTOGRAM_SUPPORT */
#endif /*SS_LIGHT_MEM_LEAK_STS */
sprintf(dbgPrntBuf, "Passed size (%d) does not match with allocated size(%d):%8p, Bucket Id:%03d\n",
size, ptrHdr->requestedSize, ptr, regCb->mapTbl[idx].bktIdx);
#endif
- printf("Passed size (%d) does not match with allocated size(%d):%8p, Bucket Id:%03d\n",
+ DU_LOG("\nERROR --> Passed size (%d) does not match with allocated size(%d):%8p, Bucket Id:%03d\n",
size, ptrHdr->requestedSize, ptr, regCb->mapTbl[idx].bktIdx);
abort();
}
}
#endif
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
- printf("Memory signature is invalid\n");
+ DU_LOG("\nERROR --> Memory signature is invalid\n");
abort();
#endif
}
SDisplay(0, dbgPrntBuf);
#endif /* DEBUGP */
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
- printf("Attempt to double deallocate memory at: %8p, Bucket Id:%03d,\
+ DU_LOG("\nERROR --> Attempt to double deallocate memory at: %8p, Bucket Id:%03d,\
size %u bytes \n", ptr, regCb->mapTbl[idx].bktIdx, bkt->size);
abort();
#endif
/*cm_mem_c_001.main_21-added new function*/
/*cm_mem_c_001.main_23 Removed support of SSI_DEBUG_LEVEL1 and SS_HISTOGRAM_SUPPORT for SS_FAP*/
#ifdef SS_FAP
-#ifdef ANSI
static S16 cmAllocWL
(
Void *regionCb,
Size *size,
-uint32_t flags,
+uint32_t flags,
Data **ptr
)
-#else
-static S16 cmAllocWL(regionCb, size, flags, ptr)
-Void *regionCb;
-Size *size;
-uint32_t flags;
-Data **ptr;
-#endif
{
- uint16_t idx;
+ uint16_t idx;
CmMmBkt *bkt;
CmMmRegCb *regCb;
/*cm_mem_c_001.main_23 Removed support of SSI_DEBUG_LEVEL1 and SS_HISTOGRAM_SUPPORT for SS_FAP*/
*
*/
-#ifdef ANSI
-static S16 cmFreeWL
-(
-Void *regionCb,
-Data *ptr,
-Size size
-)
-#else
-static S16 cmFreeWL(regionCb, ptr, size)
-Void *regionCb;
-Data *ptr;
-Size size;
-#endif
+static S16 cmFreeWL(Void *regionCb,Data *ptr, Size size)
{
- uint16_t idx;
+ uint16_t idx;
CmMmBkt *bkt;
CmMmRegCb *regCb;
/*cm_mem_c_001.main_23 Removed support of SSI_DEBUG_LEVEL1 and SS_HISTOGRAM_SUPPORT for SS_FAP*/
*
*/
-#ifdef ANSI
-static S16 cmCtl
-(
-Void *regionCb,
-Event event,
-SMemCtl *memCtl
-)
-#else
-static S16 cmCtl(regionCb, event, memCtl)
-Void *regionCb;
-Event event;
-SMemCtl *memCtl;
-#endif
+static S16 cmCtl(Void *regionCb,Event event, SMemCtl *memCtl)
{
CmMmRegCb *regCb;
* File: cm_mem.c
*
*/
-#ifdef ANSI
static Void cmMmBktInit
(
-Data **memAddr,
+Data **memAddr,
CmMmRegCb *regCb,
CmMmRegCfg *cfg,
-uint16_t bktIdx,
-uint16_t *lstMapIdx
+uint16_t bktIdx,
+uint16_t *lstMapIdx
)
-#else
-static Void cmMmBktInit (memAddr, regCb, cfg, bktIdx, lstMapIdx)
-Data **memAddr;
-CmMmRegCb *regCb;
-CmMmRegCfg *cfg;
-uint16_t bktIdx;
-uint16_t *lstMapIdx;
-#endif
{
uint32_t cnt;
uint16_t idx;
* File: cm_mem.c
*
*/
-#ifdef ANSI
-static Void cmMmHeapInit
-(
-Data *memAddr,
-CmMmHeapCb *heapCb,
-Size size
-)
-#else
-static Void cmMmHeapInit (memAddr, heapCb, size)
-Data *memAddr;
-CmMmHeapCb *heapCb;
-Size size;
-#endif
+static Void cmMmHeapInit(Data *memAddr,CmMmHeapCb *heapCb,Size size)
{
/* cm_mem_c_001.main_12 - addition for ssi enhancements */
#ifdef SSI_DEBUG_LEVEL1
#endif
#ifdef SS_HISTOGRAM_SUPPORT
#ifdef SSI_DEBUG_LEVEL1
-#ifdef ANSI
static S16 cmHeapAlloc
(
CmMmHeapCb *heapCb,
Bool hstReg
)
#else
-static S16 cmHeapAlloc (heapCb, ptr, size, memType, line, fileName, entId, hstReg)
-CmMmHeapCb *heapCb;
-Data **ptr;
-Size *size;
-uint32_t memType;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-Bool hstReg;
-#endif
-#else
-#ifdef ANSI
static S16 cmHeapAlloc
(
CmMmHeapCb *heapCb,
uint8_t entId,
Bool hstReg
)
-#else
-static S16 cmHeapAlloc (heapCb, ptr, size, line, fileName, entId, hstReg)
-CmMmHeapCb *heapCb;
-Data **ptr;
-Size *size;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-Bool hstReg;
-#endif
#endif /* SSI_DEBUG_LEVEL1 */
#else
#ifdef SSI_DEBUG_LEVEL1
-#ifdef ANSI
static S16 cmHeapAlloc
(
CmMmHeapCb *heapCb,
uint32_t memType
)
#else
-static S16 cmHeapAlloc (heapCb, ptr, size, memType)
-CmMmHeapCb *heapCb;
-Data **ptr;
-Size *size;
-uint32_t memType;
-#endif
-#else
-#ifdef ANSI
static S16 cmHeapAlloc
(
CmMmHeapCb *heapCb,
Data **ptr,
Size *size
)
-#else
-static S16 cmHeapAlloc (heapCb, ptr, size)
-CmMmHeapCb *heapCb;
-Data **ptr;
-Size *size;
-#endif
#endif /* SSI_DEBUG_LEVEL1 */
/* cm_mem_c_001.main_15 : Additions */
#endif /* SS_HISTOGRAM_SUPPORT */
*/
/* cm_mem_c_001.main_15 : Additions */
#ifdef SS_HISTOGRAM_SUPPORT
-#ifdef ANSI
static S16 cmHeapFree
(
CmMmHeapCb *heapCb,
Bool hstReg
)
#else
-static S16 cmHeapFree (heapCb, ptr, size, line, fileName, entId, hstReg)
-CmMmHeapCb *heapCb;
-Data *ptr;
-Size size;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-Bool hstReg;
-#endif
-#else
-#ifdef ANSI
static S16 cmHeapFree
(
CmMmHeapCb *heapCb,
Data *ptr,
Size size
)
-#else
-static S16 cmHeapFree (heapCb, ptr, size)
-CmMmHeapCb *heapCb;
-Data *ptr;
-Size size;
-#endif
/* cm_mem_c_001.main_15 : Additions */
#endif /* SS_HISTOGRAM_SUPPORT */
{
} /* end of cmHeapFree */
#endif/*USE_PURE*/
#ifdef SS_LIGHT_MEM_LEAK_STS
-#ifdef ANSI
-uint32_t cmGetFreeIndx
-(
-Void
-)
-#else
uint32_t cmGetFreeIndx(Void)
-#endif
{
if(gmemLkCb.head == gmemLkCb.tail)
}
}
-#ifdef ANSI
-uint32_t cmPutFreeIndx
-(
-uint32_t allocQIndx
-)
-#else
-uint32_t cmPutFreeIndx(allocQIndx)
-uint32_t allocQIndx;
-#endif
-
+uint32_t cmPutFreeIndx(uint32_t allocQIndx)
{
uint32_t tmpTail = (gmemLkCb.tail+1)% CM_MAX_ALLOC_ENTERIES;
if(tmpTail == gmemLkCb.head)
* File: cm_mem.c
*
*/
-#ifdef ANSI
-Void cmInitMemLeak
-(
-Void
-)
-#else
Void cmInitMemLeak (Void)
-#endif
{
uint32_t indx;
* File: cm_mem.c
*
**/
-#ifdef ANSI
-Void cmDeinitMemLeak
-(
-Void
-)
-#else
-Void cmDeinitMemLeak (Void)
-#endif
+Void cmDeinitMemLeak(Void)
{
uint32_t indx;
* File: cm_mem.c
*
*/
-#ifdef ANSI
-uint32_t cmStorAllocBlk
-(
-Void *addr
-)
-#else
-uint32_t cmStorAllocBlk (addr)
-Void *addr;
-#endif /* ANSI */
-
+uint32_t cmStorAllocBlk(Void *addr)
{
uint32_t allocQIndx;
* File: cm_mem.c
*
*/
-#ifdef ANSI
-Void cmRlsAllocBlk
-(
-uint32_t allocQIndx
-)
-#else
-Void cmRlsAllocBlk(allocQIndx)
-uint32_t allocQIndx;
-#endif
+Void cmRlsAllocBlk(uint32_t allocQIndx)
{
if(allocQIndx < CM_MAX_ALLOC_ENTERIES)
* File: cm_mem.c
*
*/
-#ifdef ANSI
-Void cmStartStopLeakLog
-(
-Void
-)
-#else
Void cmStartStopLeakLog(Void)
-#endif
{
if (FALSE == gmemLkCb.isStarted)
{
- printf("!!leak capturing started\n");
+ DU_LOG("\nINFO --> leak capturing started\n");
gmemLkCb.isStarted = TRUE;
}
else
{
gmemLkCb.isStarted = FALSE;
- printf("!!leak capturing stopped\n");
+ DU_LOG("\nINFO --> leak capturing stopped\n");
cmPrintLeakLog();
}
return;
* File: cm_mem.c
*
*/
-#ifdef ANSI
-Void cmPrintLeakLog
-(
-Void
-)
-#else
Void cmPrintLeakLog(Void)
-#endif
{
uint32_t indx;
static uint32_t leakCount =0;
- printf("---- START OF LEAK LOG ----");
+ DU_LOG("\nINFO --> START OF LEAK LOG ");
SLock(&gmemLkCb.memLock);
- printf("---- Lock Acquired ----");
+ DU_LOG("\nINFO --> Lock Acquired");
for(indx = 0; indx < CM_MAX_ALLOC_ENTERIES; indx++)
{
if(gmemLkCb.allocInfo[indx].used == TRUE)
{
leakCount++;
aBkt =(CmMmBlkHdr *)gmemLkCb.allocInfo[indx].memAddr;
- printf("LeakCnt(%ld)Addr(0x%p)RqSz(%ld)",
+ DU_LOG("LeakCnt(%ld)Addr(0x%p)RqSz(%ld)",
leakCount,gmemLkCb.allocInfo[indx].memAddr, aBkt->requestedSize);
- printf("LineNo(%ld)funcName(%s)\n",
+ DU_LOG("LineNo(%ld)funcName(%s)\n",
aBkt->lineNo, aBkt->currFuncName);
gmemLkCb.allocInfo[indx].used = FALSE;
cmPutFreeIndx(indx);
//if(leakCount % 10 == 0)
// sleep(1);
}
- printf("---- END OF LEAK LOG ----");
+ DU_LOG("\nINFO --> END OF LEAK LOG ");
SUnlock(&gmemLkCb.memLock);
- printf("---- Lock Released ----");
+ DU_LOG("\nINFO --> Lock Released");
leakCount =0;
return;
}
*
*/
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
-#ifdef ANSI
Void cmRlsAllocBlk
(
CmMmBlkHdr *ptrHdr,
CmMmRegCb *regCb
)
#else
-Void cmRlsAllocBlk(ptrHdr, regCb)
-CmMmBlkHdr *ptrHdr;
-CmMmRegCb *regCb;
-#endif
-#else
-#ifdef ANSI
Void cmRlsAllocBlk
(
#ifdef BIT_64
uint32_t addr
#endif
)
-#else
-Void cmRlsAllocBlk(addr)
-#ifdef BIT_64
-uint64_t addr;
-#else
-uint32_t addr;
-#endif
-#endif
#endif
{
Ptr trace[CM_MAX_STACK_TRACE];
S8 **funcNm;
- uint8_t idx;
- uint8_t i;
+ uint8_t idx;
+ uint8_t i;
S16 retVal;
S32 traceSize;
#ifndef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
*
*/
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
-#ifdef ANSI
Void cmStorAllocBlk
(
CmMmBlkHdr *ptrHdr,
CmMmRegCb *regCb
)
#else
-Void cmStorAllocBlk (ptrHdr, reqSz, allocSz, bktIdx, regCb)
-CmMmBlkHdr *ptrHdr;
-Size reqSz;
-Size allocSz;
-uint16_t bktIdx;
-CmMmRegCb *regCb;
-#endif
-#else
-#ifdef ANSI
Void cmStorAllocBlk
(
#ifdef BIT_64
Size allocSz,
uint16_t bktIdx
)
-#else
-Void cmStorAllocBlk (addr, reqSz, allocSz, bktIdx)
-#ifdef BIT_64
-uint64_t addr;
-#else
-uint32_t addr;
-#endif
-Size reqSz;
-Size allocSz;
-uint16_t bktIdx;
-#endif /* ANSI */
#endif /* BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1 */
{
#ifndef SS_MEM_LEAK_SOL
#else
funcNm = (S8 **)calloc(1, (sizeof(uint32_t) * CM_MAX_STACK_TRACE));
#endif
- /* SGetSBuf(DFLT_REGION, DFLT_POOL, &funcNm, sizeof(uint32_t) * CM_MAX_STACK_TRACE); */
+ /* SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,DFLT_REGION, DFLT_POOL, &funcNm, sizeof(uint32_t) * CM_MAX_STACK_TRACE); */
traceSize = backtrace((Void **)funcNm, CM_MAX_STACK_TRACE);
#else /* SS_MEM_LEAK_SOL */
#ifndef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
allocInfo = (MemAllocInfo *)calloc(1, sizeof(MemAllocInfo));
#endif
#endif
- /* SGetSBuf(DFLT_REGION, DFLT_POOL, &allocInfo, sizeof(MemAllocInfo)); */
+ /* SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,DFLT_REGION, DFLT_POOL, &allocInfo, sizeof(MemAllocInfo)); */
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
/* check if hashListCp is initialised yet */
if ( regCb->brdcmSsiLstCp.nmbBins == 0)
* File: cm_mem.c
*
*/
-#ifdef ANSI
-Void SLogLkInfo
-(
-Void
-)
-#else
Void SLogLkInfo (Void)
-#endif
{
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
uint8_t idx;
* File: cm_mem.c
*
*/
-#ifdef ANSI
-Void cmInitMemLeakMdl
-(
-Void
-)
-#else
Void cmInitMemLeakMdl (Void)
-#endif
{
uint8_t memMdl;
- uint8_t hashIdx;
+ uint8_t hashIdx;
memLkCb.memLkMdlInit = FALSE;
* File: cm_mem.c
*
**/
-#ifdef ANSI
-Void cmDeinitMemLeakMdl
-(
-Void
-)
-#else
Void cmDeinitMemLeakMdl (Void)
-#endif
{
uint8_t memMdl;
uint8_t hashIdx;
* File: cm_mem.c
*
*/
-#ifdef ANSI
-Void cmMemOpenMemLkFile
-(
-S8 *arg
-)
-#else
-Void cmMemOpenMemLkFile (arg)
-S8 *msOptArg;
-#endif
+Void cmMemOpenMemLkFile(S8 *arg)
{
memLkCb.fileLkLog = NULLP;
memLkCb.fileLkLog = fopen(arg, "w");
* File: cm_mem.c
*
*/
-#ifdef ANSI
-Void SFlushLkInfo
-(
-Void
-)
-#else
Void SFlushLkInfo (Void)
-#endif
{
- MemAllocInfo *newMemInfo;
- uint8_t memMdl;
- uint8_t hashIdx;
- S8 **funcNm;
+ MemAllocInfo *newMemInfo;
+ uint8_t memMdl;
+ uint8_t hashIdx;
+ S8 **funcNm;
#ifdef SS_MEM_LEAK_SOL
uint8_t i;
#endif /* SS_MEM_LEAK_SOL */
#else
free(funcNm[i]);
#endif
- /* SPutSBuf(DFLT_REGION, DFLT_POOL, funcNm[i], sizeof(uint32_t) * CM_MAX_STACK_TRACE); */
+ /* SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,DFLT_REGION, DFLT_POOL, funcNm[i], sizeof(uint32_t) * CM_MAX_STACK_TRACE); */
}
#endif /* SS_MEM_LEAK_SOl */
/*cm_mem_c_001.main_27 SSI-4GMX specfic changes*/
* File: cm_mem.c
*
*/
-#ifdef ANSI
-uint8_t cmMemGetModuleId
-(
-S8 **funNm,
-S32 traceSize
-)
-#else
-uint8_t cmMemGetModuleId (funNm, traceSize)
-S8 **funNm;
-S32 traceSize;
-#endif /* ANSI */
+uint8_t cmMemGetModuleId(S8 **funNm,S32 traceSize)
{
- uint8_t idx;
- uint8_t memStrIdx;
- uint32_t len;
+ uint8_t idx;
+ uint8_t memStrIdx;
+ uint32_t len;
S32 retVal;
S16 memReqIdx;
S16 mdlFunStrIdx;
* File: cm_mem.c
*
*/
-#ifdef ANSI
S16 cmMemGetStrMtchIdx
(
uint8_t strtIdx,
S8 *str,
S8 **strLst
)
-#else
-S16 cmMemGetStrMtchIdx(strtIdx, endIdx, str, strLst)
-uint8_t strtIdx;
-uint8_t endIdx;
-S8 *str;
-S8 **strLst;
-#endif
{
S8 cmpStr[255];
* File: cm_mem.c
*
*/
-#ifdef ANSI
-S32 cmAddrToSymStr
-(
-Void *pc,
-S8 *buffer,
-S32 size
-)
-#else
-S32 cmAddrToSymStr(pc, buffer, size)
-Void *pc;
-S8 *buffer;
-S32 size;
-#endif
+S32 cmAddrToSymStr(Void *pc, S8 *buffer, S32 size)
{
Dl_info info;
* File: cm_mem.c
*
*/
-#ifdef ANSI
-S32 cmLeakCallBack
-(
-uintptr_t pc,
-S32 sigNo,
-Void *arg
-)
-#else
-S32 cmLeakCallBack(pc, sigNo, arg)
-uintptr_t pc;
-S32 sigNo;
-Void *arg;
-#endif
+S32 cmLeakCallBack(uintptr_t pc,S32 sigNo, Void *arg)
{
S8 *buffer;
#else
buffer = (S8 *)calloc(1, 510);
#endif
- /* SGetSBuf(DFLT_REGION, DFLT_POOL, &buffer, 510); */
+ /* SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,DFLT_REGION, DFLT_POOL, &buffer, 510); */
(void) cmAddrToSymStr((void *)pc, buffer, 505);
bt->bt_buffer[bt->bt_actcount++] = (S8 *)buffer;
*
*/
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
-#ifdef ANSI
-S16 cmMmRegIsBlkSane
-(
-CmMmBlkHdr *blkPtr,
-Size size
-)
-#else
-S16 cmMmRegIsBlkSane(blkPtr, size)
-CmMmBlkHdr *blkPtr;
-Size size;
-#endif
+S16 cmMmRegIsBlkSane(CmMmBlkHdr *blkPtr,Size size)
#else
-#ifdef ANSI
-S16 cmMmRegIsBlkSane
-(
-CmMmBlkHdr *blkPtr
-)
-#else
-S16 cmMmRegIsBlkSane(blkPtr)
-CmMmBlkHdr *blkPtr;
-#endif
+S16 cmMmRegIsBlkSane(CmMmBlkHdr *blkPtr)
#endif
{
uint32_t sigCnt;
* File: cm_mem.c
*
*/
-#ifdef ANSI
-static S16 cmMmBktSanityChk
-(
-CmMmBkt *bkt
-)
-#else
-static S16 cmMmBktSanityChk(bkt)
-CmMmBkt *bkt;
-#endif
+static S16 cmMmBktSanityChk(CmMmBkt *bkt)
{
CmMmBlkHdr *ptrBlk;
uint32_t blkCnt;
* File: cm_mem.c
*
*/
-#ifdef ANSI
-static S16 cmMmHeapSanityChk
-(
-CmMmHeapCb *heapCb
-)
-#else
-static S16 cmMmHeapSanityChk(heapCb)
-CmMmHeapCb *heapCb;
-#endif
+static S16 cmMmHeapSanityChk(CmMmHeapCb *heapCb)
{
-
/* increment the trample count */
heapCb->trampleCount++;
* File: cm_mem.c
*
*/
-#ifdef ANSI
-static S16 cmMmHashFunc
-(
-CmMmHashListCp *hashListCp,
-uint32_t key,
-uint16_t *idx
-)
-#else
-static S16 cmMmHashFunc (hashListCp, key, idx)
-CmMmHashListCp *hashListCp; /* hash list control point */
-uint32_t key; /* key string */
-uint16_t *idx; /* idx to return */
-#endif
+static S16 cmMmHashFunc(CmMmHashListCp *hashListCp,uint32_t key,uint16_t *idx)
{
*idx = (uint16_t)(key % hashListCp->numOfbins);
* File: cm_mem.c
*
*/
-#ifdef ANSI
static S16 cmMmHashListInit
(
CmMmHashListCp *hashListCp, /* hash list to initialize */
-uint16_t nmbBins, /* number of hash list bins */
+uint16_t nmbBins, /* number of hash list bins */
Region region, /* memory region to allocate bins */
Pool pool /* memory pool to allocate bins */
)
-#else
-static S16 cmMmHashListInit(hashListCp, nmbBins, region, pool)
-CmMmHashListCp *hashListCp; /* hash list to initialize */
-uint16_t nmbBins; /* number of hash list bins */
-Region region; /* memory region to allocate bins */
-Pool pool; /* memory pool to allocate bins */
-#endif
{
uint16_t i;
CmMmHashListEnt *hl;
/* allocate memory for bins */
if (nmbBins)
{
- if (SGetSBuf(region, pool, (Data **) &hashListCp->hashList,
+ if (SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,region, pool, (Data **) &hashListCp->hashList,
(Size)(nmbBins * sizeof(CmMmHashListEnt))) != ROK)
return RFAILED;
* File: cm_mem.c
*
*/
-#ifdef ANSI
static S16 cmMmHashListDeinit
(
CmMmHashListCp *hashListCp, /* hash list to deinitialize */
-Region region, /* memory region to allocate bins */
-Pool pool /* memory pool to allocate bins */
+Region region, /* memory region to allocate bins */
+Pool pool /* memory pool to allocate bins */
)
-#else
-static S16 cmMmHashListDeinit(hashListCp, region, pool)
-CmMmHashListCp *hashListCp; /* hash list to deinitialize */
-Region region; /* memory region to allocate bins */
-Pool pool; /* memory pool to allocate bins */
-#endif
{
/* deallocate memory for bins */
if (hashListCp->numOfbins)
- (Void) SPutSBuf(region, pool,
+ (Void) SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,region, pool,
(Data *) hashListCp->hashList,
(Size) (hashListCp->numOfbins * sizeof(CmMmHashListEnt)));
* File: cm_mem.c
*
*/
-#ifdef ANSI
static S16 cmMmHashListInsert
(
CmMmHashListCp *hashListCp, /* hash list to add to */
-uint32_t key /* pointer to key */
+uint32_t key /* pointer to key */
)
-#else
-static S16 cmMmHashListInsert(hashListCp, key)
-CmMmHashListCp *hashListCp; /* hash list to add to */
-uint32_t key; /* pointer to key */
-#endif
{
CmMmHashListEnt *hashListEnt; /* pointer to hash list entry header */
uint16_t idx; /* index for insertion into hash list */
* File: cm_mem.c
*
*/
-#ifdef ANSI
static S16 cmHstGrmHashListInit
(
CmHstGrmHashListCp *hashListCp /* hash list to initialize */
)
-#else
-static S16 cmHstGrmHashListInit(hashListCp)
-CmHstGrmHashListCp *hashListCp; /* hash list to initialize */
-#endif
{
/*cm_mem_c_001.main_25 : Fix for TRACE5 feature crash due to missing TRC MACRO*/
#ifdef DEBUGP
* File: cm_mem.c
*
*/
-#ifdef ANSI
static S16 cmHstGrmHashListDeInit
(
CmHstGrmHashListCp *hashListCp /* hash list to initialize */
)
-#else
-static S16 cmHstGrmHashListDeInit(hashListCp)
-CmHstGrmHashListCp *hashListCp; /* hash list to initialize */
-#endif
{
/*cm_mem_c_001.main_25 : Fix for TRACE5 feature crash due to missing TRC MACRO*/
#ifdef DEBUGP
* File: cm_mem.c
*
*/
-#ifdef ANSI
static S16 cmHstGrmFreeInsert
(
CmHstGrmHashListCp* hashListCp, /* hash list cp */
-uint32_t blkSz, /* size of the block freed */
-uint32_t line, /* Line number */
-uint8_t *fileName, /* file name */
-uint8_t entId /* Tapa task which free the memory */
+uint32_t blkSz, /* size of the block freed */
+uint32_t line, /* Line number */
+uint8_t *fileName, /* file name */
+uint8_t entId /* Tapa task which free the memory */
)
-#else
-static S16 cmHstGrmFreeInsert(hashListCp, blkSz, line, fileName, entId)
-CmHstGrmHashListCp* hashListCp; /* hash list cp */
-uint32_t blkSz; /* size of the block freed */
-uint32_t line; /* line number */
-uint8_t *fileName; /* file Name */
-uint8_t entId; /* Tapa task which frees the memory */
-#endif
{
- uint32_t binIdx = 0; /* Bin index to insert the entry into the hash list */
- uint32_t key = 0; /* Key to fine the bin index */
- uint32_t ret = 0; /* Return value */
- CmMemEntries *entry = NULLP; /* Entry which contains the information */
+ uint32_t binIdx = 0; /* Bin index to insert the entry into the hash list */
+ uint32_t key = 0; /* Key to fine the bin index */
+ uint32_t ret = 0; /* Return value */
+ CmMemEntries *entry = NULLP; /* Entry which contains the information */
/* If hash list is full then print the error tna continue */
if(hashListCp->totalNumEntries == (CMM_HIST_MAX_MEM_BIN * CMM_HIST_MAX_MEM_ENTRY_PER_BIN))
{
- printf("No place in the hash list. Increase the value of macro CMM_HIST_MAX_MEM_BIN and CMM_HIST_MAX_MEM_ENTRY_PER_BIN \n");
+ DU_LOG("\nERROR --> No place in the hash list. Increase the value of macro CMM_HIST_MAX_MEM_BIN and CMM_HIST_MAX_MEM_ENTRY_PER_BIN \n");
return RFAILED;
} /* End of if */
* File: cm_mem.c
*
*/
-#ifdef ANSI
static S16 cmHstGrmAllocInsert
(
CmHstGrmHashListCp *hashListCp,
-uint32_t blkSz,
-uint32_t *reqSz,
-uint32_t line,
-uint8_t *fileName,
-uint8_t entId
+uint32_t blkSz,
+uint32_t *reqSz,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId
)
-#else
-static S16 cmHstGrmAllocInsert(hashListCp, blkSz, reqSz, line, fileName, entId)
-CmHstGrmHashListCp *hashListCp;
-uint32_t blkSz;
-uint32_t *reqSz;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-#endif
{
- uint32_t binIdx = 0;
- uint32_t key = 0;
- uint32_t ret = 0;
- CmMemEntries *entry = NULLP;
+ uint32_t binIdx = 0;
+ uint32_t key = 0;
+ uint32_t ret = 0;
+ CmMemEntries *entry = NULLP;
/* check for the total number of entries in the hash list. *
if(hashListCp->totalNumEntries == (CMM_HIST_MAX_MEM_BIN * CMM_HIST_MAX_MEM_ENTRY_PER_BIN))
{
- printf("No place in the hash list. Increase the value of macro CMM_HIST_MAX_MEM_BIN and CMM_HIST_MAX_MEM_ENTRY_PER_BIN\n");
+ DU_LOG("\nERROR --> No place in the hash list. Increase the value of macro CMM_HIST_MAX_MEM_BIN and CMM_HIST_MAX_MEM_ENTRY_PER_BIN\n");
return RFAILED;
} /* End of if */
* File: cm_mem.c
*
*/
-#ifdef ANSI
static S16 cmHstGrmGetHashIdxAndKey
(
-uint8_t *fileName,
-uint32_t line,
-uint32_t *binIdx,
-uint32_t *key
+uint8_t *fileName,
+uint32_t line,
+uint32_t *binIdx,
+uint32_t *key
)
-#else
-static S16 cmHstGrmGetHashIdxAndKey(fileName, line, binIdx, key)
-uint8_t *fileName;
-uint32_t line;
-uint32_t *binIdx;
-uint32_t *key;
-#endif
{
uint32_t i = 0;
* File: cm_mem.c
*
*/
-#ifdef ANSI
static S16 cmHstGrmFillEntry
(
-CmMemEntries *entry,
-uint32_t key,
-uint32_t line,
-uint8_t *fileName,
-uint8_t entId
+CmMemEntries *entry,
+uint32_t key,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId
)
-#else
-static S16 cmHstGrmFillEntry(entry, key, line, fileName, entId)
-CmMemEntries *entry;
-uint32_t key;
-uint32_t line;
-uint8_t *fileName;
-uint8_t entId;
-#endif
{
uint32_t idx = 0;
* File: cm_mem.c
*
*/
-#ifdef ANSI
static S16 cmHstGrmFindEntry
(
CmHstGrmHashListCp *hashListCp,
-uint32_t key,
-uint32_t *binIdx,
-CmMemEntries **entry
+uint32_t key,
+uint32_t *binIdx,
+CmMemEntries **entry
)
-#else
-static S16 cmHstGrmFindEntry(hashListCp, key, binIdx, entry)
-CmHstGrmHashListCp *hashListCp;
-uint32_t key;
-uint32_t *binIdx;
-CmMemEntries **entry;
-#endif
{
- uint32_t numEnt = 0;
- uint32_t numBin = 0;
+ uint32_t numEnt = 0;
+ uint32_t numBin = 0;
CmHstGrmHashListEnt *tmpBin = NULLP;
for(numBin = 0; numBin < CMM_HIST_MAX_MEM_BIN; numBin++)
} /* End of if (numEnt) */
else
{
- printf ("Unable to find the entry in hash list\n");
+ DU_LOG("\nERROR --> Unable to find the entry in hash list\n");
return RFAILED;
}/* End of else (numEnt) */
}/* end of for (numBin = 0) */
- printf("Unable to find the entry in the hash list\n");
+ DU_LOG("\nERROR --> Unable to find the entry in the hash list\n");
return RFAILED;
} /* end of cmHstGrmFindEntry */