Adding new commiter to ODU-High repo
[o-du/l2.git] / src / cm / cm_mem.x
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17 *******************************************************************************/
18
19 \f
20 /********************************************************************20**
21  
22      Name:     Common Memory Manager 
23  
24      Type:     C include file
25  
26      Desc:     Data structure definitions that are used by 
27                the Common Memory Manager.
28  
29      File:     cm_mem.x
30  
31      Sid:      cm_mem.x@@/main/13 - Fri Feb 26 13:16:42 2010
32  
33      Prg:      rm
34  
35 *********************************************************************21*/
36
37 #ifndef __CMMEMX_
38 #define __CMMEMX_
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 /*cm_mem_x_001.main_12: As these required for the following only */
44 #if (defined(SS_HISTOGRAM_SUPPORT) || defined(SS_MEM_LEAK_STS))
45 #include "cm_hash.h" /* cm_mem_x_001.main_11: Additions */
46 #include "cm_hash.x"
47 #endif /* SS_HISTOGRAM_SUPPORT */
48
49
50 \f
51 /* typedefs */
52 typedef struct cmMmRegCfg    CmMmRegCfg;
53 typedef struct cmMmBktCfg    CmMmBktCfg;
54
55  
56 typedef struct   cmMmRegCb     CmMmRegCb;
57 typedef struct   cmMmMapBkt    CmMmMapBkt;
58 typedef struct   cmMmHeapCb    CmMmHeapCb;
59 typedef struct   cmMmBkt       CmMmBkt;
60 typedef struct   cmHEntry      CmHEntry;
61 /* cm_mem_x_001.main_9 - addition of new data types for providing 
62 * header for memory blocks in buckets and a hash list to maintain
63 * size vs. numAttempts statistics 
64 */
65 #if (defined(SSI_DEBUG_LEVEL1) || defined(BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1) || defined (SS_LIGHT_MEM_LEAK_STS))
66 typedef struct cmMmBlkHdr      CmMmBlkHdr;
67 typedef struct cmMmHashListEnt   CmMmHashListEnt;
68 typedef struct cmMmHashListCp   CmMmHashListCp;
69 #endif /* SSI_DEBUG_LEVEL1 */
70 typedef Data     CmMmEntry;
71  /* cm_mem_x_001.main_11: Additions */
72 #ifdef SS_HISTOGRAM_SUPPORT 
73 typedef struct cmHstGrmHashListCp   CmHstGrmHashListCp;
74 typedef struct cmHstGrmHashListEnt  CmHstGrmHashListEnt;
75 typedef struct cmMemEntries         CmMemEntries;
76 #endif /* SS_HISTOGRAM_SUPPORT */
77  
78 /* forward definitions */
79
80 \f
81 /************************************************************************
82       Common Memory Manager Configuration Data Structures
83 ************************************************************************/
84
85 /* Bucket configuration structure. */
86 struct cmMmBktCfg
87 {
88    Size  size;              /* Size of the memory block */
89    uint32_t   numBlks;           /* Number of the block in the bucket */
90 };
91
92 /* Memory Region configuration structure. */ 
93 struct cmMmRegCfg
94 {
95    Size      size;          /* Size of the memory */
96    Data     *vAddr;         /* Start address of the memory */
97    uint8_t        lType;         /* Lock Type to be used */
98  
99    uint8_t        chFlag;        /* Flag defines the memory region characteristics */
100    Data     *pAddr;         /* Physical address of the memory block: Valid 
101                                if CMM_REG_PHY_VALID bit of chFlag is set */
102    Size      bktQnSize;     /* Quatum size of the memory block */
103    uint16_t       numBkts;       /* Number of buckets in the Bucket Pool */
104  
105    CmMmBktCfg  bktCfg[CMM_MAX_BKT_ENT];  /* Bucket configuration structure */
106 };
107  
108 /************************************************************************
109       Common Memory Manager Implementation Data Structures
110 ************************************************************************/
111 /* cm_mem_x_001.main_11: Additions */
112 #ifdef SS_HISTOGRAM_SUPPORT 
113 struct cmMemEntries /* Entry information */
114 {
115    uint32_t              line; /* Line Number where memory allocation primitive used */
116    uint32_t              allocBytes; /* Granted Byte */
117    uint32_t              allocOverFlow; /* If the value of allocBytes overflows then we use this variable */
118    uint32_t              freedBytes; /* Freed Bytes */
119    uint32_t              freeOverFlow; /* If the value of freeByte overflows then we use this value */
120    uint32_t              wastedBytes; /* Difference between Granted and Requested bytes */
121    uint32_t              bucketAllocReq; /* No of times this Bucket used */
122    uint32_t              bucketFreeReq; /* No of times this Bucket freed */
123    uint32_t              entId; /* Tapa task used this bucket */
124    uint32_t              key; /* combination of file name and line */
125    uint8_t               fileName[CMM_HIST_MAX_FILENAME]; /* File Name where memory allocation primitive used */
126 };
127
128 struct cmHstGrmHashListEnt    /* hash list entry */
129 {
130    CmMemEntries      entries[CMM_HIST_MAX_MEM_ENTRY_PER_BIN]; /* Number of entires in each bin */
131    uint32_t               numOfEntries; /*Number of entries in hash list */
132 };
133
134 struct cmHstGrmHashListCp /* Hash List control pointer */
135 {
136    CmHstGrmHashListEnt   hashList[CMM_HIST_MAX_MEM_BIN]; /* Number of bins in hash list */
137    uint16_t                   totalNumEntries; /* Total number of bins */
138 };
139
140 #endif /* SS_HISTOGRAM_SUPPORT */
141
142 /* cm_mem_x_001.main_9 - addition of memory header for blocks in buckets */
143 #if (defined(SSI_DEBUG_LEVEL1) || defined(BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1) || defined (SS_LIGHT_MEM_LEAK_STS))
144 /* Memory Block Header */
145 struct cmMmBlkHdr
146 {
147    /* trSignature shall always be maintained as the first element in this structure */
148    uint8_t          trSignature[CMM_TRAMPLING_SIGNATURE_LEN];  /* signature to detect trampling */
149    CmMmBlkHdr  *nextBlk;         /* pointer to the next memory block header */
150    uint32_t         memFlags;         /* Free/Static/Dynamic */
151    Size        requestedSize;    /* requested size for which this mem blk has been allocated */
152 #ifdef SS_LIGHT_MEM_LEAK_STS
153    uint32_t         timeStamp;        /* Time stamp */
154    uint32_t         lineNo;
155    uint32_t         allocQueueIndx;
156    uint8_t          *currFuncName;
157 #endif
158 #ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
159    CmHashListEnt         ent;    /* hash list entry  */
160    Size                  reqSz;  /* Requested size */
161    Size                  allocSz;/* Allocated size */
162    uint8_t                    bktIdx; /* Bucket ID */
163    Void                  *backTrace[BRDCM_MEM_LEAK_BTRACE]; /* Back trace */
164 #endif
165 };
166 #ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
167 typedef struct cmMmBlkTail
168 {
169    uint8_t     trSignature[CMM_TRAMPLING_SIGNATURE_LEN];  /* signature to detect trampling */
170 }CmMmBlkTail;
171 typedef struct memLkInfo
172 {
173    Bool        memLkMdlInit;
174    FILE        *fileLkLog;
175 }MemLkInfo;
176 #endif
177 #endif /* SSI_DEBUG_LEVEL1 */
178
179 /* Memory bucket structure */
180 struct cmMmBkt                /* Bucket Structure */
181 {
182 /* cm_mem_x_001.main_9 - addition of next block pointer */
183 #if (defined(SSI_DEBUG_LEVEL1) || defined(BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1) || defined (SS_LIGHT_MEM_LEAK_STS))
184    CmMmBlkHdr   *nextBlk;   /* pointer to the next memory block header */
185 #if (defined(BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1) || defined (SS_LIGHT_MEM_LEAK_STS))
186    CmMmBlkHdr   *lastBlk;      /* Pointer to the last memory block header */
187 #endif
188 #else
189    CmMmEntry   *next;         /* Pointer to the next memory block */
190 #ifdef SSI_MEM_CORR_PREVENTION
191    CmMmEntry   *last;         /* Pointer to the last memory block */
192 #endif
193 #ifdef MS_MBUF_CORRUPTION /*PST Should not take code Under this flag*/
194    CmMmEntry   *last;         /* Pointer to the last memory block */
195 #endif
196 #endif /* SSI_DEBUG_LEVEL1 */
197    Size         size;         /* Size of the block */
198    uint32_t          numBlks;      /* Total number of blocks in the bucket */
199    uint32_t          maxAlloc;     /* Maximum number of blocks allocated till now */
200    uint32_t          numAlloc;     /* Number of blocks allocated */
201    SLockId      bktLock;      /* Lock to protect the bucket pool */ 
202    uint32_t          bktFailCnt;   /* bucket alloc failure count */
203    uint32_t          bktNoFitCnt;  /* number of blocks not fit */
204 /* cm_mem_x_001.main_9 - addition of statistics related data */
205 #if (defined(SSI_DEBUG_LEVEL1) || defined(BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1))
206    Data         *bktStartPtr;   /* maintains the start address of the memory block in the bucket */
207    StsCntr      numAllocAttempts;   /* total number of allocation attempts */
208    StsCntr      numDeallocAttempts;   /* total number of de-allocation attempts */
209    Size         staticMemUsed;   /* amount of memory used for static allocations */
210    Size         dynamicMemUsed;   /* amount of memory used for dynamic allocations */
211    uint8_t           trampleCount;   /* incremented everytime a trampling is detected in any block of the bucket */
212 #endif /*SSI_DEBUG_LEVEL1*/
213 /* cm_mem_x_001.main_11: Additions */
214 #ifdef SS_HISTOGRAM_SUPPORT 
215   CmHstGrmHashListCp hstGrmHashListCp;
216 #endif /* SS_HISTOGRAM_SUPPORT */
217 };
218
219
220 /* Size-To-Bucket map table structure */ 
221 struct cmMmMapBkt
222 {
223    uint16_t   bktIdx;              /* The index to the memory bucket */
224
225 #if (ERRCLASS & ERRCLS_DEBUG)
226    uint16_t   numReq;              /* Number of the allocation request */
227    uint16_t   numFailure;          /* Number of allocation failure form the bucket */
228 #endif
229
230 };
231
232 /* Heap entry structure linked in the heap control block */ 
233 struct cmHEntry
234 {
235 /* cm_mem_x_001.main_9 - addition to provide trampling and double-free detections support */
236 #ifdef SSI_DEBUG_LEVEL1
237   /* trSignature shall always be maintianed as the first element in this structure */
238   uint8_t         trSignature[CMM_TRAMPLING_SIGNATURE_LEN];  /* signature to detect trampling */
239   uint32_t        memFlags;          /* flag to maintain the memory status */
240   Size       requestedSize;     /* size of the heap entry block */
241 #endif /* SSI_DEBUG_LEVEL1 */
242   CmHEntry  *next;             /* Pointer to the next entry block */
243   Size       size;             /* size of the heap entry block */
244 };
245
246 /* Heap control block */
247 struct cmMmHeapCb
248 {
249    Data     *vStart;           /* Memory start address */
250    Data     *vEnd;             /* Memory end address */
251    CmHEntry *next;             /* Next heap block entry */
252    Size      avlSize;          /* Total available memory */
253    Size      minSize;          /* Minimum size that can be allocated */
254    SLockId   heapLock;         /* Lock to protect the heap pool */
255 #if (ERRCLASS & ERRCLS_DEBUG)
256    uint16_t       numFragBlk;       /* Number of fragmented block */
257    uint16_t       numReq;           /* Number of allocation request */
258    uint16_t       numFailure;       /* Number of allocation failure */
259 #endif
260    uint32_t       heapAllocCnt;     /* Number of blocks from heap */
261 /* cm_mem_x_001.main_9 - addition of statistics related data */
262 #ifdef SSI_DEBUG_LEVEL1
263    Size     staticHeapMemUsed; /* amount of heap memory used for static allocations */
264    Size     dynamicHeapMemUsed; /* amount of heap memory used for dynamic allocations */
265    Size     nextOffset; /* Offset to the next pointer in structure CmHEntry */
266                         /* Update this in cmMmHeapInit if cmHEntry is changed */
267    StsCntr      numAllocAttempts;   /* total number of allocation attempts in heap */
268    StsCntr      numDeallocAttempts;   /* total number of de-allocation attempts in heap */
269    uint8_t          trampleCount;       /* incremented everytime a trampling is detected in any block of the heap */
270 #endif /* SSI_DEBUG_LEVEL1 */
271  /* cm_mem_x_001.main_11: Additions */
272 #ifdef SS_HISTOGRAM_SUPPORT
273    /* Hash list to support Heap Block histogram */
274    CmHstGrmHashListCp heapHstGrmHashListCp;
275 #endif /* SS_HISTOGRAM_SUPPORT */
276
277 };
278
279 /* cm_mem_x_001.main_9 - addition of hash list for maintaining size vs. numAttempts statistics */
280 #ifdef SSI_DEBUG_LEVEL1
281 struct cmMmHashListEnt    /* hash list entry */
282 {
283    uint32_t  size;             /* pointer to key */
284    uint32_t  numAttempts;      /* number of attempts */
285 };
286
287 struct cmMmHashListCp
288 {
289    CmMmHashListEnt  *hashList;
290    uint16_t  numOfbins;
291    uint16_t  numOfEntries;
292 };
293 #endif /* SSI_DEBUG_LEVEL1 */
294
295 /* Memory region control block */ 
296 struct cmMmRegCb
297 {
298    Region       region;        /* Region  Id of the memory */
299    SRegInfo     regInfo;       /* Region information block */
300
301    uint8_t           chFlag;        /* Flag defines the region characteristics */
302    Data        *pAddr;         /* Physical address of the memory block.
303                                   Valid if CMM_REG_PHY_VALID bit is set */
304  
305    Size         bktSize;       /* Size of the memory used for the bucket pool */
306    uint16_t          bktQnPwr;      /* Quantum size of the bucket pool */
307    Size         bktMaxBlkSize; /* Maximum size of block in the bucket pool */
308    uint16_t          numBkts;       /* Number of buckets in the Bucket Pool */
309
310    CmMmMapBkt   mapTbl[CMM_MAX_MAP_ENT]; /* size-to-bucket map table */
311    CmMmBkt      bktTbl[CMM_MAX_BKT_ENT]; /* Pointer to the memory bkt tbl */
312  
313    Bool         heapFlag;      /* Set to true if the heap pool is configured */
314    Size         heapSize;      /* Size of the heap pool */
315    CmMmHeapCb   heapCb;        /* Heap pool control block */
316 /* cm_mem_x_001.main_9 - addition of hash list control point in region control block */
317 #ifdef SSI_DEBUG_LEVEL1
318    CmMmHashListCp hashListCp;  /* hast list to maintain the size statistics */
319 #endif /* SSI_DEBUG_LEVEL1 */
320 #ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
321    CmHashListCp brdcmSsiLstCp;  /* hast list to maintain the SSI memory information for Broadcom */
322 #endif
323 #ifdef SS_MULTICORE_SUPPORT /*cm_mem_x_001.main_10*/
324    SsSTskEntry  *sTsk;
325 #endif /* SS_MULTICORE_SUPPORT */
326
327 };
328
329 #ifdef SS_LIGHT_MEM_LEAK_STS
330 typedef struct allocInfo
331 {
332    Void   *memAddr;
333    uint8_t     used;
334 }AllocInfo;
335
336 typedef struct memLeakCb
337 {
338   SLockId    memLock;
339   uint8_t         isStarted;
340   AllocInfo  allocInfo[CM_MAX_ALLOC_ENTERIES];
341   uint32_t        queue[CM_MAX_ALLOC_ENTERIES];
342   uint32_t        head;
343   uint32_t        tail;
344 }MemLeakCb;
345
346 Void cmInitMemLeak     ARGS((Void));
347 Void cmDeinitMemLeak   ARGS((Void));
348 Void cmStartStopLeakLog   ARGS((Void));
349 uint32_t  cmStorAllocBlk       ARGS((Void *addr));
350 Void cmRlsAllocBlk        ARGS((uint32_t indx));
351 Void cmPrintLeakLog       ARGS((Void));
352 #endif /* SS_LIGHT_MEM_LEAK_STS */
353
354  /* cm_mem_x_001.main_11: Additions */
355 #ifdef SS_MEM_LEAK_STS
356 typedef struct _memHash
357 {
358    SLockId         memLck;
359    Bool            used;
360    CmHashListCp    memHashCp;
361 }MemHash;
362
363 typedef struct _memAllocInfo
364 {
365    CmHashListEnt         ent;
366 #ifdef BIT_64
367    uint64_t                   memAddr;
368 #else
369    uint32_t                   memAddr;
370 #endif
371    Size                  reqSz;
372    Size                  allocSz;
373    uint16_t                   bktIdx;
374    uint8_t                    moduleId;
375    uint8_t                    bTrcSz;
376    PTR                   backTrace;
377 }MemAllocInfo; 
378
379 typedef struct _memLkCb
380 {
381    Bool        memLkMdlInit;
382    FILE        *fileLkLog;
383    MemHash     memUsrMdl[CM_MEM_USR_MDL][CM_MAX_HASH_PER_TSK];
384 }MemLkCb;
385
386 typedef struct _memUsrMdlStr
387 {
388    Txt   *fPStr;
389    Txt   *mdlStr; 
390 }MemUsrMdlStr;
391
392 #ifdef SS_MEM_LEAK_SOL
393 typedef struct backtrace
394 {
395   Void   **bt_buffer;
396   S32    bt_maxcount;
397   S32    bt_actcount;
398 } Backtrace_t;
399 #endif /* SS_MEM_LEAK_SOL */
400
401 #endif /* SS_MEM_LEAK_STS */
402
403 #ifdef T2K_MEM_LEAK_DBG
404 #define T2K_MEM_LEAK_INFO_TABLE_SIZE 8388606
405    /* osCp.wls.allocAddr is the starting address allocated by WLS,
406           * whenever that changes pleasse change here */
407 uint64_t  t2k_MEM_LEAK_START_ADDR;
408
409
410 typedef struct _t2kMemLeakInfo
411 {
412    uint64_t address; /* 0 means it is free */
413    uint32_t size;    /* size of the block */
414    uint32_t age; /* in ticks, when it was allocated */
415    uint32_t lineNo;  /* lineNo in the file from where allocation was done */
416    char* fileName; /* from where allocation was done */
417    uint32_t prevRemLineNo;  /* lineNo in the file from where allocation was done */
418    char* prevRemFileName; /* from where allocation was done */
419    uint32_t lastDelLineNum;  /* lineNo in the file from where allocation was done */
420    char* lastDelFileName; /* from where allocation was done */
421 }T2kMeamLeakInfo;
422
423 typedef struct _regMemLeakInfo
424 {
425    uint32_t             numActvRegions;
426    T2kMeamLeakInfo *gMemLeakInfo[SS_MAX_REGS]; /* Allocate using calloc(system Call ) size T2K_MEM_LEAK_INFO_TABLE_SIZE*/
427    uint64_t             regStartAddr[SS_MAX_REGS];  /* start Address of Region  */
428    pthread_mutex_t memLock[SS_MAX_REGS];  /*  Region Lock */
429 }RegionMemLeakInfo;
430
431 #endif /*T2K_MEM_LEAK_DBG */
432
433 \f
434 /* functions prototypes */
435  
436 S16 cmMmRegInit   ARGS((
437                          Region region, 
438                          CmMmRegCb *regCb, 
439                          CmMmRegCfg *cfg));
440 S16 cmMmRegDeInit ARGS(( CmMmRegCb *regCb));
441  /* cm_mem_x_001.main_11: Additions */
442 #ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
443 Void cmRlsAllocBlk       ARGS((CmMmBlkHdr *ptrHdr, CmMmRegCb *regCb));
444 Void cmStorAllocBlk      ARGS((CmMmBlkHdr  *ptrHdr, Size reqSz, Size allocSz,
445                                       uint16_t bktIdx, CmMmRegCb *regCb));
446 #endif
447 #ifdef SS_MEM_LEAK_STS
448 Void cmInitMemLeakMdl    ARGS((Void));
449 /* cm_mem_x_001.main_12 : Additions */
450 Void cmDeinitMemLeakMdl    ARGS((Void));
451 #ifdef BIT_64
452 Void cmStorAllocBlk      ARGS((uint64_t addr, Size reqSz, Size allocSz,
453                                       uint16_t bktIdx));
454 Void cmRlsAllocBlk       ARGS((uint64_t addr));
455 #else
456 Void cmStorAllocBlk      ARGS((uint32_t addr, Size reqSz, Size allocSz,
457                                       uint16_t bktIdx));
458 Void cmRlsAllocBlk       ARGS((uint32_t addr));
459 #endif
460 uint8_t   cmMemGetModuleId    ARGS((S8 **funNm, S32 traceSize));
461 S16  cmMemGetStrMtchIdx  ARGS((uint8_t strtIdx, uint8_t endIdx,
462                                       S8 *str, S8 **strLst));
463 Void cmMemOpenMemLkFile  ARGS((S8 *arg));
464 Void SLogLkInfo          ARGS((Void));
465 Void SFlushLkInfo        ARGS((Void));
466
467 #ifdef SS_MEM_LEAK_SOL
468 S32 cmAddrToSymStr       ARGS((Void *pc, S8 *buffer, S32 size));
469 S32 cmLeakCallBack       ARGS((uintptr_t pc, S32 signo, Void *arg));
470 S32 backtrace            ARGS((Void **buffer, S32 count));
471 #endif /* SS_MEM_LEAK_SOL */
472
473 #endif /* SS_MEM_LEAK_STS */
474 /* cm_mem_x_001.main_9 - addition of an API prototype for sanity check */
475 #ifdef SSI_DEBUG_LEVEL1
476 S16 cmMmRegIsBlkSane ARGS((CmMmBlkHdr *blkPtr));
477 #endif /* SSI_DEBUG_LEVEL1 */
478
479 #ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
480 S16 cmMmRegIsBlkSane ARGS((CmMmBlkHdr *blkPtr, Size size));
481 #endif
482 #ifdef SS_HISTOGRAM_SUPPORT
483 #ifdef SSI_DEBUG_LEVEL1
484 S16  cmAllocNL ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr, uint32_t  memType, uint32_t line, uint8_t *fileName, uint8_t entId, Bool hstReg));
485 #else
486 S16  cmAllocNL ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr, uint32_t line, uint8_t *fileName, uint8_t entId, Bool hstReg));
487 #endif
488 #elif defined(SS_LIGHT_MEM_LEAK_STS)
489 S16  cmAllocNL ARGS((Void   *regionCb,Size   *size,uint32_t     flags,Data  **ptr,uint32_t     memType,uint32_t     lineNo,uint8_t     *funcName));
490 #else
491 #if (defined(SSI_DEBUG_LEVEL1) || defined(BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1))
492 S16  cmAllocNL ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr, uint32_t  memType));
493 #else
494 S16  cmAllocNL ARGS((Void *regionCb, Size *size, uint32_t flags, Data **ptr));
495 #endif
496 #endif
497
498 #ifdef SS_HISTOGRAM_SUPPORT
499 S16  cmFreeNL ARGS((Void *regionCb, Data *ptr, Size size, uint32_t line, uint8_t *fileName, uint8_t entId, Bool hstReg));
500 #elif defined(SS_LIGHT_MEM_LEAK_STS)
501 S16  cmFreeNL ARGS((Void   *regionCb,Data   *ptr, Size    size,uint32_t     lineNo,uint8_t      *funcName));
502 #else
503 S16  cmFreeNL ARGS((Void *regionCb, Data *ptr, Size size));
504 #endif
505
506 #ifdef __cplusplus
507 }
508 #endif
509
510 #endif
511 \f
512 /**********************************************************************
513          End of file
514 **********************************************************************/