/*ccpu00142274 - UL mem based flow control changes */
#ifdef TENB_T2K3K_SPECIFIC_CHANGES
/* selva */
-U32 gMemoryAlarm;
-PRIVATE U32 memoryCheckCounter;
+uint32_t gMemoryAlarm;
+PRIVATE uint32_t memoryCheckCounter;
#define NUM_CALLS_TO_CHECK_MEM_AGAIN 80 /* Number of calls after which need to check mem */
#ifndef L2_L3_SPLIT
#define NUM_FREE_BUFFERS 128
typedef struct cmBtInfo
{
- U32 btInfoIdx;
+ uint32_t btInfoIdx;
CmMemFreeInfo btInfo[NUM_FREE_BUFFERS];
} CmBtInfo;
}CmMemDoubleFree;
PTR prvAllocPtr[8];
-U8 stopBtInfo = FALSE;
+uint8_t stopBtInfo = FALSE;
Buffer *palBuffer;
EXTERN Buffer *mtTskBuffer1;
EXTERN Buffer *mtTskBuffer2;
#ifdef SS_USE_ICC_MEMORY
#ifdef T2K_MEM_LEAK_DBG
-PRIVATE S16 cmIccAlloc ARGS((Void *regionCb, Size *size, U32 flags, Data **ptr, char*, U32));
-PRIVATE S16 cmIccFree ARGS((Void *regionCb, Data *ptr, Size size,char*, U32));
-PRIVATE S16 cmIccAllocWithLock ARGS((Void *regionCb, Size *size, U32 flags, Data **ptr, char*, U32));
-PRIVATE S16 cmIccFreeWithLock ARGS((Void *regionCb, Data *ptr, Size size,char*, U32));
-void InsertToT2kMemLeakInfo ARGS((U32 address, U32 size, U32 lineNo, char* fileName));
-void RemoveFromT2kMemLeakInfo ARGS((U32 address, char *file, U32 line));
-PRIVATE U32 getT2kMemLeakIndex ARGS((U32 address));
-#else
-PRIVATE S16 cmIccAlloc ARGS((Void *regionCb, Size *size, U32 flags, Data **ptr));
+PRIVATE S16 cmIccAlloc ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr, char*, uint32_t));
+PRIVATE S16 cmIccFree ARGS((Void *regionCb, Data *ptr, Size size,char*, uint32_t));
+PRIVATE S16 cmIccAllocWithLock ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr, char*, uint32_t));
+PRIVATE S16 cmIccFreeWithLock ARGS((Void *regionCb, Data *ptr, Size size,char*, uint32_t));
+void InsertToT2kMemLeakInfo ARGS((uint32_t address, uint32_t size, uint32_t lineNo, char* fileName));
+void RemoveFromT2kMemLeakInfo ARGS((uint32_t address, char *file, uint32_t line));
+PRIVATE uint32_t getT2kMemLeakIndex ARGS((uint32_t address));
+#else
+PRIVATE S16 cmIccAlloc ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr));
PRIVATE S16 cmIccFree ARGS((Void *regionCb, Data *ptr, Size size));
-PRIVATE S16 cmIccAllocWithLock ARGS((Void *regionCb, Size *size, U32 flags, Data **ptr));
+PRIVATE S16 cmIccAllocWithLock ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr));
PRIVATE S16 cmIccFreeWithLock ARGS((Void *regionCb, Data *ptr, Size size));
#endif
#else /* SS_USE_ICC_MEMORY */
-PRIVATE S16 cmDynAllocWithLock ARGS((Void *regionCb,Size *size,U32 flags,Data **ptr));
+PRIVATE S16 cmDynAllocWithLock ARGS((Void *regionCb,Size *size,uint32_t flags,Data **ptr));
PRIVATE S16 cmDynFreeWithLock ARGS((Void *regionCb,Data *ptr, Size size));
-PRIVATE S16 cmDynAlloc ARGS((Void *regionCb,Size *size,U32 flags,Data **ptr));
+PRIVATE S16 cmDynAlloc ARGS((Void *regionCb,Size *size,uint32_t flags,Data **ptr));
PRIVATE S16 cmDynFree ARGS((Void *regionCb,Data *ptr, Size size));
#endif /* SS_USE_ICC_MEMORY */
#ifdef T2K_MEM_LEAK_DBG
-PRIVATE S16 cmAllocWL ARGS((Void *regionCb, Size *size, U32 flags, Data **ptr,char*,U32));
-PRIVATE S16 cmFreeWL ARGS((Void *regionCb, Data *ptr, Size size,char*, U32));
+PRIVATE S16 cmAllocWL ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr,char*,uint32_t));
+PRIVATE S16 cmFreeWL ARGS((Void *regionCb, Data *ptr, Size size,char*, uint32_t));
-PRIVATE S16 cmAlloc ARGS((Void *regionCb, Size *size, U32 flags, Data **ptr,char*,U32));
-PRIVATE S16 cmFree ARGS((Void *regionCb, Data *ptr, Size size,char*, U32));
+PRIVATE S16 cmAlloc ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr,char*,uint32_t));
+PRIVATE S16 cmFree ARGS((Void *regionCb, Data *ptr, Size size,char*, uint32_t));
#else
-PRIVATE S16 cmAllocWL ARGS((Void *regionCb, Size *size, U32 flags, Data **ptr));
+PRIVATE S16 cmAllocWL ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr));
PRIVATE S16 cmFreeWL ARGS((Void *regionCb, Data *ptr, Size size));
-PRIVATE S16 cmAlloc ARGS((Void *regionCb, Size *size, U32 flags, Data **ptr));
+PRIVATE S16 cmAlloc ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr));
PRIVATE S16 cmFree ARGS((Void *regionCb, Data *ptr, Size size));
#endif
#ifdef T2K_MEM_LEAK_DBG
-PRIVATE S16 cmAllocWL ARGS((Void *regionCb, Size *size, U32 flags, Data **ptr,char*,U32));
-PRIVATE S16 cmFreeWL ARGS((Void *regionCb, Data *ptr, Size size,char*, U32));
+PRIVATE S16 cmAllocWL ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr,char*,uint32_t));
+PRIVATE S16 cmFreeWL ARGS((Void *regionCb, Data *ptr, Size size,char*, uint32_t));
#else
-PRIVATE S16 cmAllocWL ARGS((Void *regionCb, Size *size, U32 flags, Data **ptr));
+PRIVATE S16 cmAllocWL ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr));
PRIVATE S16 cmFreeWL ARGS((Void *regionCb, Data *ptr, Size size));
#endif
#ifndef USE_PURE
/* cm_mem_c_008.104 - Addition for memory calculator tool */
#ifdef MEMCAL_DEBUG
PRIVATE Txt prntBuf[200]; /* print buffer */
-PRIVATE U8 tryHeap=0;
+PRIVATE uint8_t tryHeap=0;
#endif
/* cm_mem_c_001.main_12 - addition for ssi enhancements prints */
#define T2K_MEM_LEAK_START_ADDR 0x9d200000 /*New Sercomm Board*/
#endif
-U32 num_times = 0;
+uint32_t num_times = 0;
EXTERN pthread_t tmpRegTidMap[20];
extern Bool g_usettitmr;
void DumpLayersDebugInformation()
Data **memAddr,
CmMmRegCb *regCb,
CmMmRegCfg *cfg,
-U16 bktIdx,
-U16 *lstMapIdx
+uint16_t bktIdx,
+uint16_t *lstMapIdx
)
#else
PRIVATE Void cmMmStatBktInit (memAddr, regCb, cfg, bktIdx, lstMapIdx)
Data **memAddr;
CmMmRegCb *regCb;
CmMmRegCfg *cfg;
-U16 bktIdx;
-U16 *lstMapIdx;
+uint16_t bktIdx;
+uint16_t *lstMapIdx;
#endif
{
- U32 cnt;
- U16 idx;
- U32 numBlks;
+ uint32_t cnt;
+ uint16_t idx;
+ uint32_t numBlks;
Size size;
/* cm_mem_c_001.main_12 - addition for temporary variables */
#ifdef SSI_DEBUG_LEVEL1
CmMmBlkHdr **nextBlk;
- U32 sigCnt;
+ uint32_t sigCnt;
#else
Data **next;
#endif /* SSI_DEBUG_LEVEL1 */
cmHstGrmHashListInit(&(regCb->bktTbl[bktIdx].hstGrmHashListCp));
#endif /* SS_HISTOGRAM_SUPPORT */
- RETVOID;
+ return;
} /* end of cmMmStatBktInit */
/*
#endif
{
Data *memAddr;
- U16 bktIdx;
- U16 lstMapIdx;
+ uint16_t bktIdx;
+ uint16_t lstMapIdx;
#if (ERRCLASS & ERRCLS_INT_PAR)
Size lstQnSize;
{
Data **memAddr;
Data **next;
- U16 bktIdx;
- U16 bucketSetSize;
- U16 cnt;
+ uint16_t bktIdx;
+ uint16_t bucketSetSize;
+ uint16_t cnt;
Size size;
CmMmBlkSetElement *blkLstElem;
- U16 numBlks;
+ uint16_t numBlks;
#if (ERRCLASS & ERRCLS_INT_PAR)
Size lstQnSize;
(
Void *regionCb, /* Pointer to a region */
Size *size, /* size needs to be allocated */
-U32 flags, /* Flags used */
+uint32_t flags, /* Flags used */
Data **ptr, /* Reference to pointer for which need to be allocate */
char *file,
-U32 line
+uint32_t line
)
#endif
#else
(
Void *regionCb, /* Pointer to a region */
Size *size, /* size needs to be allocated */
-U32 flags, /* Flags used */
+uint32_t flags, /* Flags used */
Data **ptr /* Reference to pointer for which need to be allocate */
)
#else
PRIVATE S16 cmIccAllocWithLock(regionCb, size, flags, ptr)
Void *regionCb; /* Pointer to a region */
Size *size; /* size needs to be allocated */
-U32 flags; /* Flags used */
+uint32_t flags; /* Flags used */
Data **ptr; /* Reference to pointer for which need to be allocate */
#endif
#endif
}
#ifdef T2K_MEM_LEAK_DBG
- if(((U32)(memPtr - T2K_MEM_LEAK_START_ADDR) & 0xff) != 0)
+ if(((uint32_t)(memPtr - T2K_MEM_LEAK_START_ADDR) & 0xff) != 0)
{
printf("Address returned is %p size = %ld\n",memPtr,*size);
}
- InsertToT2kMemLeakInfo((U32)memPtr,*size,line,file);
+ InsertToT2kMemLeakInfo((uint32_t)memPtr,*size,line,file);
#endif
*ptr = memPtr;
Data *ptr, /* Memory block needs to be freed */
Size size, /* Size of the block */
char *file,
-U32 line
+uint32_t line
)
#endif
#else
}
#ifdef T2K_MEM_LEAK_DBG
- RemoveFromT2kMemLeakInfo((U32)ptr - ((U32)ptr % 512),file,line);
+ RemoveFromT2kMemLeakInfo((uint32_t)ptr - ((uint32_t)ptr % 512),file,line);
#endif
TL_Free(regCb->iccHdl, ptr);
(
Void *regionCb, /* Pointer to a region */
Size *size, /* size needs to be allocated */
-U32 flags, /* Flags used */
+uint32_t flags, /* Flags used */
Data **ptr, /* Reference to pointer for which need to be allocate */
char *file,
-U32 line
+uint32_t line
)
#else
#endif
(
Void *regionCb, /* Pointer to a region */
Size *size, /* size needs to be allocated */
-U32 flags, /* Flags used */
+uint32_t flags, /* Flags used */
Data **ptr /* Reference to pointer for which need to be allocate */
)
#else
PRIVATE S16 cmIccAlloc(regionCb, size, flags, ptr)
Void *regionCb; /* Pointer to a region */
Size *size; /* size needs to be allocated */
-U32 flags; /* Flags used */
+uint32_t flags; /* Flags used */
Data **ptr; /* Reference to pointer for which need to be allocate */
#endif
*p = 10;
}
#ifdef T2K_MEM_LEAK_DBG
- if(((U32)(memPtr - T2K_MEM_LEAK_START_ADDR) & 0xff) != 0)
+ if(((uint32_t)(memPtr - T2K_MEM_LEAK_START_ADDR) & 0xff) != 0)
{
printf("Address returned is %p size = %ld\n",memPtr,*size);
}
- InsertToT2kMemLeakInfo((U32)memPtr,*size,line,file);
+ InsertToT2kMemLeakInfo((uint32_t)memPtr,*size,line,file);
#endif
#ifdef YS_PHY_3_8_2
*ptr = memPtr;/*TL_VA2TRUEVA(regCb->iccHdl, memPtr); */
Data *ptr, /* Memory block needs to be freed */
Size size, /* Size of the block */
char* file,
-U32 line
+uint32_t line
)
#else
#ifdef ANSI
// memPtr = TL_TRUEVA2VA(regCb->iccHdl, ptr);
{
#ifdef T2K_MEM_LEAK_DBG
- RemoveFromT2kMemLeakInfo((U32)ptr - ((U32)ptr % 512),file,line);
+ RemoveFromT2kMemLeakInfo((uint32_t)ptr - ((uint32_t)ptr % 512),file,line);
#endif
}
#endif
{
Region region;
- U16 lstMapIdx;
- U16 cnt;
+ uint16_t lstMapIdx;
+ uint16_t cnt;
Size size;
CmMmBlkSetElement *blkLstElem;
SRegInfo regInfo;
Size bktQnSize = MT_BKTQNSIZE;
- U16 idx;
- U16 idx1;
- U16 numBkts;
+ uint16_t idx;
+ uint16_t idx1;
+ uint16_t numBkts;
/* Initialize the region control block */
CmMmRegCb *regCb;
#endif
{
- U16 bktIdx;
+ uint16_t bktIdx;
#if (ERRCLASS & ERRCLS_INT_PAR)
#ifdef ANSI
PRIVATE CmMmBlkSetElement* cmGetMemBlkSetForAlloc
(
-U8 bucketIndex, /* Index to the bucket list */
+uint8_t bucketIndex, /* Index to the bucket list */
CmMmDynBktCb *bkt /* Bucket list control block */
)
#else
PRIVATE CmMmBlkSetElement* cmGetMemBlkSetForAlloc(bucketIndex, bkt)
-U8 bucketIndex; /* Index to the bucket list */
+uint8_t bucketIndex; /* Index to the bucket list */
CmMmDynBktCb *bkt; /* Bucket list control block */
#endif
{
#ifdef ANSI
PRIVATE CmMmBlkSetElement* cmGetMemBlkSetForFree
(
-U8 bucketIndex, /* Index to the bucket list */
+uint8_t bucketIndex, /* Index to the bucket list */
CmMmDynBktCb *bkt /* Bucket list control block */
)
#else
PRIVATE CmMmBlkSetElement* cmGetMemBlkSetForFree(bucketIndex, bkt)
-U8 bucketIndex; /* Index to the bucket list */
+uint8_t bucketIndex; /* Index to the bucket list */
CmMmDynBktCb *bkt; /* Bucket list control block */
#endif
{
CmMemDoubleFree *memNode = NULLP;
SLock(&memDoubleFreeLock);
- if((cmHashListFind(&(memDoubleFree), (U8*)&ptr,
- sizeof(U32), 0, (PTR *)&memNode)) != ROK)
+ if((cmHashListFind(&(memDoubleFree), (uint8_t*)&ptr,
+ sizeof(uint32_t), 0, (PTR *)&memNode)) != ROK)
{
Void *tmpBtArr[10];
- U16 tmpBtSize;
+ uint16_t tmpBtSize;
S8 **strings;
- U16 idx;
+ uint16_t idx;
tmpBtSize = backtrace(tmpBtArr, 10);
strings = backtrace_symbols(tmpBtArr, tmpBtSize);
memNode->memBlkPtr = ptr;
SLock(&memDoubleFreeLock);
- if((cmHashListInsert(&(memDoubleFree), (PTR)memNode, (U8*)&memNode->memBlkPtr,
+ if((cmHashListInsert(&(memDoubleFree), (PTR)memNode, (uint8_t*)&memNode->memBlkPtr,
sizeof(PTR))) != ROK)
{
SUnlock(&memDoubleFreeLock);
(
Void *regionCb, /* Pointer to a region */
Size *size, /* size needs to be allocated */
-U32 flags, /* Flags used */
+uint32_t flags, /* Flags used */
Data **ptr /* Reference to pointer for which need to be allocate */
)
#else
PRIVATE S16 cmDynAllocWithLock(regionCb, size, flags, ptr)
Void *regionCb; /* Pointer to a region */
Size *size; /* size needs to be allocated */
-U32 flags; /* Flags used */
+uint32_t flags; /* Flags used */
Data **ptr; /* Reference to pointer for which need to be allocate */
#endif
{
(
Void *regionCb, /* Pointer to a region */
Size *size, /* size needs to be allocated */
-U32 flags, /* Flags used */
+uint32_t flags, /* Flags used */
Data **ptr /* Reference to pointer for which need to be allocate */
)
#else
PRIVATE S16 cmDynAlloc(regionCb, size, flags, ptr)
Void *regionCb; /* Pointer to a region */
Size *size; /* size needs to be allocated */
-U32 flags; /* Flags used */
+uint32_t flags; /* Flags used */
Data **ptr; /* Reference to pointer for which need to be allocate */
#endif
{
if ( (*size) <= regCb->bktMaxBlkSize)
#endif
{
- U32 idx;
+ uint32_t idx;
CmMmBlkSetElement *dynMemElem;
- U32 bktIdx;
+ uint32_t bktIdx;
CmMmDynBktCb *bkt;
/* Get the map to the mapping table */
#ifdef SS_MEM_WL_DEBUG
if(dynMemElem->nextBktPtr == prvAllocPtr[regCb->region])
{
- U32 *tmpDump;
+ uint32_t *tmpDump;
*tmpDump = 100;
}
#endif
#ifdef SS_MEM_WL_DEBUG
prvAllocPtr[regCb->region] = *ptr;
- **ptr = (U8) bktIdx;
+ **ptr = (uint8_t) bktIdx;
*(*ptr+1) = 0xde;
*(*ptr+2) = 0xad;
*(*ptr+3) = 0xbe;
- *ptr += sizeof (U32);
+ *ptr += sizeof (uint32_t);
if ((bktIdx == 0) && (!stopBtInfo))
{
CmBtInfo *btInfo;
- U32 btIdx;
+ uint32_t btIdx;
btInfo = &allocBtInfo[regCb->region];
btIdx = btInfo->btInfoIdx;
btInfo->btInfo[btIdx].ptr = (PTR) *ptr;
(
Void *regionCb,
Size *size,
- U32 flags,
+ uint32_t flags,
Data **ptr ,
char* file,
- U32 line
+ uint32_t line
)
#else
#ifdef SS_HISTOGRAM_SUPPORT
(
Void *regionCb,
Size *size,
-U32 flags,
+uint32_t flags,
Data **ptr,
-U32 memType,
-U32 line,
-U8 *fileName,
-U8 entId,
+uint32_t memType,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId,
Bool hstReg
)
#else
PRIVATE S16 cmAlloc(regionCb, size, flags, ptr, memType, line, fileName, entId, hstReg)
Void *regionCb;
Size *size;
-U32 flags;
+uint32_t flags;
Data **ptr;
-U32 memType;
-U32 line;
-U8 *fileName;
-U8 entId;
+uint32_t memType;
+uint32_t line;
+uint8_t *fileName;
+uint8_t entId;
Bool hstReg;
#endif
#else
(
Void *regionCb,
Size *size,
-U32 flags,
+uint32_t flags,
Data **ptr,
-U32 line,
-U8 *fileName,
-U8 entId,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId,
Bool hstReg
)
#else
PRIVATE S16 cmAlloc(regionCb, size, flags, ptr, line, fileName, entId, hstReg)
Void *regionCb;
Size *size;
-U32 flags;
+uint32_t flags;
Data **ptr;
-U32 line;
-U8 *fileName;
-U8 entId;
+uint32_t line;
+uint8_t *fileName;
+uint8_t entId;
Bool hstReg;
#endif
#endif /* SSI_DEBUG_LEVEL1 */
(
Void *regionCb,
Size *size,
-U32 flags,
+uint32_t flags,
Data **ptr,
-U32 memType
+uint32_t memType
)
#else
PRIVATE S16 cmAlloc(regionCb, size, flags, ptr, memType)
Void *regionCb;
Size *size;
-U32 flags;
+uint32_t flags;
Data **ptr;
-U32 memType;
+uint32_t memType;
#endif
#else
#ifdef ANSI
(
Void *regionCb,
Size *size,
-U32 flags,
+uint32_t flags,
Data **ptr
)
#else
PRIVATE S16 cmAlloc(regionCb, size, flags, ptr)
Void *regionCb;
Size *size;
-U32 flags;
+uint32_t flags;
Data **ptr;
#endif
{
/* cm_mem_c_001.main_26 : Fixes for Compilation Warnings */
#ifndef USE_PURE
- U16 idx;
+ uint16_t idx;
CmMmBkt *bkt;
- U16 bktIdx;
+ uint16_t bktIdx;
#endif
CmMmRegCb *regCb;
/* cm_mem_c_001.main_26 : Fixes for Compilation Warnings */
#ifndef USE_PURE
- U16 cnt;
+ uint16_t cnt;
#endif
/* cm_mem_c_001.main_15 : Additions */
#ifdef SS_MEM_LEAK_STS
S16 cmInitDoubleFreeList()
#endif
{
- U16 offset;
+ uint16_t offset;
CmMemDoubleFree memNode;
- offset = (U16)((PTR)(&memNode.tmpListEnt) - (PTR)&memNode);
+ offset = (uint16_t)((PTR)(&memNode.tmpListEnt) - (PTR)&memNode);
if((cmHashListInit(&(memDoubleFree), 1000, offset, 0,
- CM_HASH_KEYTYPE_U32MOD, 0, 0)) != ROK);
+ CM_HASH_KEYTYPE_UINT32_MOD, 0, 0)) != ROK);
{
return RFAILED;
}
Void cmAnalyseBtInfo
(
PTR ptr, /* Memory block needs to be freed */
-U32 idx
+uint32_t idx
)
#else
Void cmAnalyseBtInfo (ptr,idx)
PTR ptr; /* Memory block needs to be freed */
-U32 idx;
+uint32_t idx;
#endif
{
- U32 tmpCnt;
- U32 btIdx;
+ uint32_t tmpCnt;
+ uint32_t btIdx;
CmBtInfo *btInfo;
- U8 regIdx;
+ uint8_t regIdx;
/* for(regIdx = 0; regIdx < 8; regIdx++)
{ */
(btInfo->btInfo[btIdx].ptr + 128 ) >= ptr) */
if(btInfo->btInfo[btIdx].btSize != 0)
{
- U32 i;
+ uint32_t i;
char **strings;
strings = backtrace_symbols( btInfo->btInfo[btIdx].btArr,btInfo->btInfo[btIdx].btSize);
printf("*** Last Allocation Region = %d PTR %x Timestamp sec = (%ld) usec = (%ld) ***\n", idx, ptr, btInfo->btInfo[btIdx].timeStamp.tv_sec, btInfo->btInfo[btIdx].timeStamp.tv_usec);
}
/* } */
- RETVOID;
+ return;
}
#endif
{
CmMmDynRegCb *regCb;
#ifndef USE_PURE
- U32 idx;
- U32 bktIdx;
+ uint32_t idx;
+ uint32_t bktIdx;
CmMmDynBktCb *bkt = NULLP;
CmMmBlkSetElement *dynMemElem;
#endif
#ifdef SS_MEM_WL_DEBUG
- U8 tmpBktIdx;
- U8 tmpVal;
+ uint8_t tmpBktIdx;
+ uint8_t tmpVal;
#endif
#endif
#ifdef SS_MEM_WL_DEBUG
- ptr -= sizeof (U32);
+ ptr -= sizeof (uint32_t);
size += 4;
#endif
/* The memory block was allocated from the bucket pool */
{
printf("2nd time Size = %d bucket size = %d\n", size, bkt->size);
exit(-1);
- U8 *tmpptr = NULLP;
+ uint8_t *tmpptr = NULLP;
printf("Bucket Size wrong \n");
*tmpptr = 10;
}
}
#ifdef SS_MEM_WL_DEBUG
- tmpBktIdx = (U8)*ptr;
- tmpVal = (U8)*(ptr+1);
+ tmpBktIdx = (uint8_t)*ptr;
+ tmpVal = (uint8_t)*(ptr+1);
if ((tmpBktIdx != bktIdx) || (tmpVal != 0xde))
{
- U8 *tmpptr = NULLP;
+ uint8_t *tmpptr = NULLP;
printf("bktIdx wrong \n");
*tmpptr = 10;
}
if ((bktIdx == 0) && (!stopBtInfo))
{
CmBtInfo *btInfo;
- U32 btIdx;
+ uint32_t btIdx;
btInfo = ®BtInfo[regCb->region];
btIdx = btInfo->btInfoIdx;
btInfo->btInfo[btIdx].ptr = (PTR) ptr;
Data *ptr,
Size size,
char* file,
- U32 line
+ uint32_t line
)
#else
#ifdef SS_HISTOGRAM_SUPPORT
Void *regionCb,
Data *ptr,
Size size,
-U32 line,
-U8 *fileName,
-U8 entId,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId,
Bool hstReg
)
#else
Void *regionCb;
Data *ptr;
Size size;
-U32 line;
-U8 *fileName;
-U8 entId;
+uint32_t line;
+uint8_t *fileName;
+uint8_t entId;
Bool hstReg;
#endif
{
/* cm_mem_c_001.main_26 : Fixes for Compilation Warnings */
#ifndef USE_PURE
- U16 idx;
+ uint16_t idx;
CmMmBkt *bkt;
- U16 bktIdx;
+ uint16_t bktIdx;
#endif
CmMmRegCb *regCb;
/* cm_mem_c_001.main_12 - addition for holding the free pointer */
(
Void *regionCb,
Size *size,
-U32 flags,
+uint32_t flags,
Data **ptr ,
char* file,
-U32 line
+uint32_t line
)
#else
#ifdef ANSI
(
Void *regionCb,
Size *size,
-U32 flags,
+uint32_t flags,
Data **ptr
)
#else
PRIVATE S16 cmAllocWL(regionCb, size, flags, ptr)
Void *regionCb;
Size *size;
-U32 flags;
+uint32_t flags;
Data **ptr;
#endif
#endif
{
#ifndef USE_PURE
- U16 idx;
+ uint16_t idx;
CmMmBkt *bkt = NULLP;
#endif
CmMmRegCb *regCb;
Data *ptr,
Size size,
char* file,
-U32 line
+uint32_t line
)
#else
#ifdef ANSI
#endif
{
#ifndef USE_PURE
- U16 idx;
+ uint16_t idx;
CmMmBkt *bkt = NULLP;
#endif
CmMmRegCb *regCb;
/* Check if the Bucket pool is configured */
if (regCb->bktSize)
{
- U16 idx;
+ uint16_t idx;
CmMmBkt *bkt;
- U32 avlSize, totSize;
+ uint32_t avlSize, totSize;
/*
* The bucket pool is configured. The status value returned
* does reflect on the memory availabilty in the bucket pool.
{
/* cm_mem_c_001.main_12 - addition for ssi enhancements */
#ifdef SSI_DEBUG_LEVEL1
- U16 idx;
+ uint16_t idx;
#endif /* SSI_DEBUG_LEVEL1 */
/* Initialize the heap control block */
/* Initialise the memory histogram hash list */
cmHstGrmHashListInit(&(heapCb->heapHstGrmHashListCp));
#endif /* SS_HISTOGRAM_SUPPORT */
- RETVOID;
+ return;
} /* end of cmMmHeapInit */
CmMmHeapCb *heapCb,
Data **ptr,
Size *size,
-U32 memType,
-U32 line,
-U8 *fileName,
-U8 entId,
+uint32_t memType,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId,
Bool hstReg
)
#else
CmMmHeapCb *heapCb;
Data **ptr;
Size *size;
-U32 memType;
-U32 line;
-U8 *fileName;
-U8 entId;
+uint32_t memType;
+uint32_t line;
+uint8_t *fileName;
+uint8_t entId;
Bool hstReg;
#endif
#else
CmMmHeapCb *heapCb,
Data **ptr,
Size *size,
-U32 line,
-U8 *fileName,
-U8 entId,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId,
Bool hstReg
)
#else
CmMmHeapCb *heapCb;
Data **ptr;
Size *size;
-U32 line;
-U8 *fileName;
-U8 entId;
+uint32_t line;
+uint8_t *fileName;
+uint8_t entId;
Bool hstReg;
#endif
#endif /* SSI_DEBUG_LEVEL1 */
CmMmHeapCb *heapCb,
Data **ptr,
Size *size,
-U32 memType
+uint32_t memType
)
#else
PRIVATE S16 cmHeapAlloc (heapCb, ptr, size, memType)
CmMmHeapCb *heapCb;
Data **ptr;
Size *size;
-U32 memType;
+uint32_t memType;
#endif
#else
#ifdef ANSI
CmHEntry *alocHeapBlk;
Size requestedSize;
Size hdr;
- U16 idx;
+ uint16_t idx;
#endif /* SSI_DEBUG_LEVEL1 */
/* cm_mem_c_001.main_15 : Additions */
#ifdef SS_HISTOGRAM_SUPPORT
CmMmHeapCb *heapCb,
Data *ptr,
Size size,
-U32 line,
-U8 *fileName,
-U8 entId,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId,
Bool hstReg
)
#else
CmMmHeapCb *heapCb;
Data *ptr;
Size size;
-U32 line;
-U8 *fileName;
-U8 entId;
+uint32_t line;
+uint8_t *fileName;
+uint8_t entId;
Bool hstReg;
#endif
#else
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
Void cmInitMemLeakMdl (Void)
#endif
{
- U8 memMdl;
- U8 hashIdx;
+ uint8_t memMdl;
+ uint8_t hashIdx;
memLkCb.memLkMdlInit = FALSE;
{
SInitLock(&memLkCb.memUsrMdl[memMdl][hashIdx].memLck, 1);
cmHashListInit(&memLkCb.memUsrMdl[memMdl][hashIdx].memHashCp,
- 500, 0, FALSE, CM_HASH_KEYTYPE_U32MOD, 0, 0);
+ 500, 0, FALSE, CM_HASH_KEYTYPE_UINT32_MOD, 0, 0);
memLkCb.memUsrMdl[memMdl][hashIdx].used = FALSE;
}
}
}
memLkCb.memLkMdlInit = TRUE;
- RETVOID;
+ return;
} /* cmInitMemLeakMdl */
/* cm_mem_c_002.main_21 Added for shutdown procedure */
/*
* Desc: De-initializes the memory leak detection module
*
*
- * Ret: RETVOID
+ * Ret: void
*
* Notes: This function de-initializes the memory leak detection module.
*
Void cmDeinitMemLeakMdl (Void)
#endif
{
- U8 memMdl;
- U8 hashIdx;
+ uint8_t memMdl;
+ uint8_t hashIdx;
memLkCb.memLkMdlInit = FALSE;
memLkCb.memUsrMdl[memMdl][hashIdx].used = FALSE;
}
}
- RETVOID;
+ return;
}
/*
*
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
{
memLkCb.fileLkLog = NULLP;
memLkCb.fileLkLog = fopen(arg, "w");
- RETVOID;
+ return;
}
/*
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
MemAllocInfo *oldMemInfo;
MemAllocInfo *newMemInfo;
- U8 memMdl;
- U8 hashIdx;
- U8 idx;
+ uint8_t memMdl;
+ uint8_t hashIdx;
+ uint8_t idx;
Txt prntBuf[255];
S8 **funcNm;
if( memLkCb.memLkMdlInit == FALSE)
{
- RETVOID;
+ return;
}
sprintf(prntBuf, "\n------- START OF LEAK LOG -------\n");
fwrite(prntBuf, strlen(prntBuf), 1, memLkCb.fileLkLog);
}
sprintf(prntBuf, "\n------- END OF LEAK LOG -------\n");
fwrite(prntBuf, strlen(prntBuf), 1, memLkCb.fileLkLog);
- RETVOID;
+ return;
}
/*
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
#endif
{
MemAllocInfo *newMemInfo;
- U8 memMdl;
- U8 hashIdx;
+ uint8_t memMdl;
+ uint8_t hashIdx;
S8 **funcNm;
#ifdef SS_MEM_LEAK_SOL
- U8 i;
+ uint8_t i;
#endif /* SS_MEM_LEAK_SOL */
if( memLkCb.memLkMdlInit == FALSE)
{
- RETVOID;
+ return;
}
for(memMdl = 0; memMdl < CM_MEM_USR_MDL; memMdl++)
#else
free(funcNm[i]);
#endif
- /* SPutSBuf(DFLT_REGION, DFLT_POOL, funcNm[i], sizeof(U32) * CM_MAX_STACK_TRACE); */
+ /* SPutSBuf(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*/
SUnlock(&memLkCb.memUsrMdl[memMdl][hashIdx].memLck);
}
}
- RETVOID;
+ return;
}
/*
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
#ifdef ANSI
Void cmStorAllocBlk
(
-U32 addr,
+uint32_t addr,
Size reqSz,
Size allocSz,
-U16 bktIdx
+uint16_t bktIdx
)
#else
Void cmStorAllocBlk (addr, reqSz, allocSz, bktIdx)
-U32 addr;
+uint32_t addr;
Size reqSz;
Size allocSz;
-U16 bktIdx;
+uint16_t bktIdx;
#endif /* ANSI */
{
#ifndef SS_MEM_LEAK_SOL
S8 **funcNm;
S32 traceSize;
MemAllocInfo *allocInfo;
- U8 moduleId;
+ uint8_t moduleId;
if( memLkCb.memLkMdlInit == FALSE)
{
- RETVOID;
+ return;
}
#ifdef SS_MEM_LEAK_SOL
* implementation. */
/*cm_mem_c_001.main_27 SSI-4GMX specfic changes*/
#ifdef SS_4GMX_LCORE
- funcNm = (S8 **)MxHeapAlloc(SsiHeap, (sizeof(U32) * CM_MAX_STACK_TRACE));
- memset(funcNm, 0, (sizeof(U32) * CM_MAX_STACK_TRACE));
+ funcNm = (S8 **)MxHeapAlloc(SsiHeap, (sizeof(uint32_t) * CM_MAX_STACK_TRACE));
+ memset(funcNm, 0, (sizeof(uint32_t) * CM_MAX_STACK_TRACE));
#else
- funcNm = (S8 **)calloc(1, (sizeof(U32) * CM_MAX_STACK_TRACE));
+ funcNm = (S8 **)calloc(1, (sizeof(uint32_t) * CM_MAX_STACK_TRACE));
#endif
- /* SGetSBuf(DFLT_REGION, DFLT_POOL, &funcNm, sizeof(U32) * CM_MAX_STACK_TRACE); */
+ /* SGetSBuf(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 */
traceSize = backtrace(trace, CM_MAX_STACK_TRACE);
allocInfo->bTrcSz = traceSize;
cmHashListInsert(&memLkCb.memUsrMdl[moduleId][addr & 0x3].memHashCp,
- (PTR)allocInfo, (U8 *)&(allocInfo->memAddr),
+ (PTR)allocInfo, (uint8_t *)&(allocInfo->memAddr),
sizeof(allocInfo->memAddr));
memLkCb.memUsrMdl[moduleId][addr & 0x3].used = TRUE;
(Void) SUnlock(&(memLkCb.memUsrMdl[moduleId][addr & 0x3].memLck));
- RETVOID;
+ return;
} /* cmStorAllocBlk */
/*
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
*
*/
#ifdef ANSI
-U8 cmMemGetModuleId
+uint8_t cmMemGetModuleId
(
S8 **funNm,
S32 traceSize
)
#else
-U8 cmMemGetModuleId (funNm, traceSize)
+uint8_t cmMemGetModuleId (funNm, traceSize)
S8 **funNm;
S32 traceSize;
#endif /* ANSI */
{
- U8 idx;
- U8 memStrIdx;
- U32 len;
+ uint8_t idx;
+ uint8_t memStrIdx;
+ uint32_t len;
S32 retVal;
S16 memReqIdx;
S16 mdlFunStrIdx;
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
#ifdef ANSI
S16 cmMemGetStrMtchIdx
(
-U8 strtIdx,
-U8 endIdx,
+uint8_t strtIdx,
+uint8_t endIdx,
S8 *str,
S8 **strLst
)
#else
S16 cmMemGetStrMtchIdx(strtIdx, endIdx, str, strLst)
-U8 strtIdx;
-U8 endIdx;
+uint8_t strtIdx;
+uint8_t endIdx;
S8 *str;
S8 **strLst;
#endif
{
S8 cmpStr[255];
- U32 len;
+ uint32_t len;
Bool found;
- U32 tempLen;
- U8 idx;
+ uint32_t tempLen;
+ uint8_t idx;
S32 retVal;
len = strlen((const S8 *)str);
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
#ifdef ANSI
Void cmRlsAllocBlk
(
-U32 addr
+uint32_t addr
)
#else
Void cmRlsAllocBlk(addr)
-U32 addr;
+uint32_t addr;
#endif
{
Ptr trace[CM_MAX_STACK_TRACE];
S8 **funcNm;
- U8 idx;
- U8 i;
+ uint8_t idx;
+ uint8_t i;
S16 retVal;
S32 traceSize;
MemAllocInfo *memAllocInfo;
if( memLkCb.memLkMdlInit == FALSE)
{
- RETVOID;
+ return;
}
{
SLock(&memLkCb.memUsrMdl[idx][addr & 0x3].memLck);
retVal = cmHashListFind(&memLkCb.memUsrMdl[idx][addr & 0x3].memHashCp,
- (U8 *)&addr, sizeof(U32), 0,
+ (uint8_t *)&addr, sizeof(uint32_t), 0,
(PTR *)&memAllocInfo);
if(retVal == ROK)
{
#endif /* SS_MEM_LEAK_SOL */
/*cm_mem_c_001.main_25 : */
- RETVOID;
+ return;
} /* cmRlsAllocBlk */
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
* Desc: Initializes the memory leak detection module
*
*
-* Ret: RETVOID
+* Ret: void
*
* Notes: This function initializes the memory leak detection module.
*
#endif
{
CmMmBlkHdr *ptrBlk;
- U32 blkCnt;
+ uint32_t blkCnt;
bkt->trampleCount = 0;
CmMmBlkHdr *blkPtr;
#endif
{
- U32 sigCnt;
+ uint32_t sigCnt;
for ( sigCnt=0; sigCnt < CMM_TRAMPLING_SIGNATURE_LEN; sigCnt++)
PRIVATE S16 cmMmHashFunc
(
CmMmHashListCp *hashListCp,
-U32 key,
-U16 *idx
+uint32_t key,
+uint16_t *idx
)
#else
PRIVATE S16 cmMmHashFunc (hashListCp, key, idx)
CmMmHashListCp *hashListCp; /* hash list control point */
-U32 key; /* key string */
-U16 *idx; /* idx to return */
+uint32_t key; /* key string */
+uint16_t *idx; /* idx to return */
#endif
{
- *idx = (U16)(key % hashListCp->numOfbins);
+ *idx = (uint16_t)(key % hashListCp->numOfbins);
return ROK;
PRIVATE S16 cmMmHashListInit
(
CmMmHashListCp *hashListCp, /* hash list to initialize */
-U16 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
PRIVATE S16 cmMmHashListInit(hashListCp, nmbBins, region, pool)
CmMmHashListCp *hashListCp; /* hash list to initialize */
-U16 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 */
#endif
{
- U16 i;
+ uint16_t i;
CmMmHashListEnt *hl;
PRIVATE S16 cmMmHashListInsert
(
CmMmHashListCp *hashListCp, /* hash list to add to */
-U32 key /* pointer to key */
+uint32_t key /* pointer to key */
)
#else
PRIVATE S16 cmMmHashListInsert(hashListCp, key)
CmMmHashListCp *hashListCp; /* hash list to add to */
-U32 key; /* pointer to key */
+uint32_t key; /* pointer to key */
#endif
{
CmMmHashListEnt *hashListEnt; /* pointer to hash list entry header */
- U16 idx; /* index for insertion into hash list */
- U16 i;
+ uint16_t idx; /* index for insertion into hash list */
+ uint16_t i;
/* check if hashListCp is initialised yet */
PRIVATE S16 cmHstGrmFreeInsert
(
CmHstGrmHashListCp* hashListCp, /* hash list cp */
-U32 blkSz, /* size of the block freed */
-U32 line, /* Line number */
-U8 *fileName, /* file name */
-U8 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
PRIVATE S16 cmHstGrmFreeInsert(hashListCp, blkSz, line, fileName, entId)
CmHstGrmHashListCp* hashListCp; /* hash list cp */
-U32 blkSz; /* size of the block freed */
-U32 line; /* line number */
-U8 *fileName; /* file Name */
-U8 entId; /* Tapa task which frees 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 frees the memory */
#endif
{
- U32 binIdx = 0; /* Bin index to insert the entry into the hash list */
- U32 key = 0; /* Key to fine the bin index */
- U32 ret = 0; /* Return value */
+ 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 */
PRIVATE S16 cmHstGrmAllocInsert
(
CmHstGrmHashListCp *hashListCp,
-U32 blkSz,
-U32 *reqSz,
-U32 line,
-U8 *fileName,
-U8 entId
+uint32_t blkSz,
+uint32_t *reqSz,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId
)
#else
PRIVATE S16 cmHstGrmAllocInsert(hashListCp, blkSz, reqSz, line, fileName, entId)
CmHstGrmHashListCp *hashListCp;
-U32 blkSz;
-U32 *reqSz;
-U32 line;
-U8 *fileName;
-U8 entId;
+uint32_t blkSz;
+uint32_t *reqSz;
+uint32_t line;
+uint8_t *fileName;
+uint8_t entId;
#endif
{
- U32 binIdx = 0;
- U32 key = 0;
- U32 ret = 0;
+ uint32_t binIdx = 0;
+ uint32_t key = 0;
+ uint32_t ret = 0;
CmMemEntries *entry = NULLP;
#ifdef ANSI
PRIVATE S16 cmHstGrmGetHashIdxAndKey
(
-U8 *fileName,
-U32 line,
-U32 *binIdx,
-U32 *key
+uint8_t *fileName,
+uint32_t line,
+uint32_t *binIdx,
+uint32_t *key
)
#else
PRIVATE S16 cmHstGrmGetHashIdxAndKey(fileName, line, binIdx, key)
-U8 *fileName;
-U32 line;
-U32 *binIdx;
-U32 *key;
+uint8_t *fileName;
+uint32_t line;
+uint32_t *binIdx;
+uint32_t *key;
#endif
{
- U32 i = 0;
+ uint32_t i = 0;
/* Calculate the key using file name and line number */
for(i = 0 ; fileName[i] != '\0'; i++)
PRIVATE S16 cmHstGrmFillEntry
(
CmMemEntries *entry,
-U32 key,
-U32 line,
-U8 *fileName,
-U8 entId
+uint32_t key,
+uint32_t line,
+uint8_t *fileName,
+uint8_t entId
)
#else
PRIVATE S16 cmHstGrmFillEntry(entry, key, line, fileName, entId)
CmMemEntries *entry;
-U32 key;
-U32 line;
-U8 *fileName;
-U8 entId;
+uint32_t key;
+uint32_t line;
+uint8_t *fileName;
+uint8_t entId;
#endif
{
- U32 idx = 0;
+ uint32_t idx = 0;
entry->key = key;
entry->line = line;
entry->entId = entId;
PRIVATE S16 cmHstGrmFindEntry
(
CmHstGrmHashListCp *hashListCp,
-U32 key,
-U32 *binIdx,
+uint32_t key,
+uint32_t *binIdx,
CmMemEntries **entry
)
#else
PRIVATE S16 cmHstGrmFindEntry(hashListCp, key, binIdx, entry)
CmHstGrmHashListCp *hashListCp;
-U32 key;
-U32 *binIdx;
+uint32_t key;
+uint32_t *binIdx;
CmMemEntries **entry;
#endif
{
- U32 numEnt = 0;
- U32 numBin = 0;
+ uint32_t numEnt = 0;
+ uint32_t numBin = 0;
CmHstGrmHashListEnt *tmpBin = NULLP;
#endif /* SS_HISTOGRAM_SUPPORT */
#ifdef T2K_MEM_LEAK_DBG
T2kMeamLeakInfo gMemLeakInfo[T2K_MEM_LEAK_INFO_TABLE_SIZE];
-U32 getT2kMemLeakIndex(U32 address)
+uint32_t getT2kMemLeakIndex(uint32_t address)
{
return ((address - T2K_MEM_LEAK_START_ADDR) >> 8);
}
-static U32 t2kMemAllocTick;
-static U32 smallTick;
+static uint32_t t2kMemAllocTick;
+static uint32_t smallTick;
-void InsertToT2kMemLeakInfo(U32 address, U32 size, U32 lineNo, char* fileName)
+void InsertToT2kMemLeakInfo(uint32_t address, uint32_t size, uint32_t lineNo, char* fileName)
{
- U32 idx = getT2kMemLeakIndex(address);
+ uint32_t idx = getT2kMemLeakIndex(address);
- if(((U32)(address - T2K_MEM_LEAK_START_ADDR) & 0xff) !=0)
+ if(((uint32_t)(address - T2K_MEM_LEAK_START_ADDR) & 0xff) !=0)
{
printf("address in InsertToT2kMemLeakInfo is %lx size = %ld file is %s"
"line is %ld \n", address, size, fileName, lineNo);
}
-void RemoveFromT2kMemLeakInfo(U32 address, char *file, U32 line)
+void RemoveFromT2kMemLeakInfo(uint32_t address, char *file, uint32_t line)
{
- U32 idx = getT2kMemLeakIndex(address);
+ uint32_t idx = getT2kMemLeakIndex(address);
if(idx >= T2K_MEM_LEAK_INFO_TABLE_SIZE)
{
#ifdef ANSI
S16 UpdateSocMemInfo
(
-U8 areaIndex,
+uint8_t areaIndex,
CmLteMemInfo *mInfo
)
#else
S16 UpdateSocMemInfo(areaIndex,mInfo)
-U8 areaIndex;
+uint8_t areaIndex;
CmLteMemInfo *mInfo;
#endif
{
- U8 idxReg;
- U8 idxPool;
- U16 numPool;
+ uint8_t idxReg;
+ uint8_t idxPool;
+ uint16_t numPool;
void *iccHdl = NULLP;
- U32 poolFreeCnt[4];
- U32 poolUsedCnt[4];
- U32 poolSize[4];
- U32 poolTotAvail[4];
+ uint32_t poolFreeCnt[4];
+ uint32_t poolUsedCnt[4];
+ uint32_t poolSize[4];
+ uint32_t poolTotAvail[4];
idxReg = mInfo->numRegions;
mInfo->numRegions = mInfo->numRegions + 1;
*
*/
#ifdef ANSI
-U32 isL2MemUsageBelowLowerThreshold(
+uint32_t isL2MemUsageBelowLowerThreshold(
Region region
)
#else
-U32 isL2MemUsageBelowLowerThreshold(region)
+uint32_t isL2MemUsageBelowLowerThreshold(region)
Region region;
#endif
{
void * iccHdl = ssGetIccHdl(region);
- U32 poolZeroFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ZERO_SIZE);
- U32 poolOneFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ONE_SIZE);
+ uint32_t poolZeroFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ZERO_SIZE);
+ uint32_t poolOneFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ONE_SIZE);
/* We are below the threshold if free count in BOTH of the pools
* is above the ICC_MEM_LOWER_THRESHOLD % */
*
*/
#ifdef ANSI
-U32 isMemUsageBelowLowerThreshold(
+uint32_t isMemUsageBelowLowerThreshold(
Region region
)
#else
-U32 isMemUsageBelowLowerThreshold(region)
+uint32_t isMemUsageBelowLowerThreshold(region)
Region region;
#endif
{
void * iccHdl = ssGetIccHdl(region);
- U32 poolZeroFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ZERO_SIZE);
- U32 poolOneFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ONE_SIZE);
- U32 poolTwoFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_TWO_SIZE);
- U32 poolThreeFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_THREE_SIZE);
+ uint32_t poolZeroFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ZERO_SIZE);
+ uint32_t poolOneFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ONE_SIZE);
+ uint32_t poolTwoFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_TWO_SIZE);
+ uint32_t poolThreeFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_THREE_SIZE);
/* We are below the threshold if free count in BOTH of the pools
* is above the ICC_MEM_LOWER_THRESHOLD % */
*
*/
#ifdef ANSI
-PRIVATE U32 isMemUsageAboveUpperThreshold(
+PRIVATE uint32_t isMemUsageAboveUpperThreshold(
Region region
)
#else
-PRIVATE U32 isMemUsageAboveUpperThreshold(region)
+PRIVATE uint32_t isMemUsageAboveUpperThreshold(region)
Region region;
#endif
{
void * iccHdl = ssGetIccHdl(region);
- U32 poolZeroFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ZERO_SIZE);
- U32 poolOneFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ONE_SIZE);
- U32 poolTwoFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_TWO_SIZE);
- U32 poolThreeFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_THREE_SIZE);
+ uint32_t poolZeroFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ZERO_SIZE);
+ uint32_t poolOneFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_ONE_SIZE);
+ uint32_t poolTwoFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_TWO_SIZE);
+ uint32_t poolThreeFreeCnt = TL_GetFreeBlocks(iccHdl, ICC_POOL_THREE_SIZE);
/* We are above the threshold if free count in either of the pools
* is below the ICC_MEM_UPPER_THRESHOLD % */
*
*/
#ifdef ANSI
-U32 isMemThreshReached(
+uint32_t isMemThreshReached(
Region reg
)
#else
-U32 isMemThreshReached(reg)
+uint32_t isMemThreshReached(reg)
Region reg;
#endif
{