Replaced old SSI function with new macros jira id - ODUHIGH-212
[o-du/l2.git] / src / cm / cm_mblk.c
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 \f
19 /********************************************************************20**
20   
21      Name:     common memory allocation library 
22   
23      Type:     C include file
24   
25      Desc:     memory library routines 
26  
27      File:     cm_mblk.c
28   
29 *********************************************************************21*/
30
31
32 /* header include files (.h) */
33 #include "envopt.h"        /* environment options */
34 #include "envdep.h"        /* environment dependent */
35 #include "envind.h"        /* environment independent */
36 #include "gen.h"           /* general layer */
37 #include "ssi.h"           /* system services */
38 #include "cm_mblk.h"       /* Header file */
39
40 /* header/extern include files (.x) */
41 #include "gen.x"           /* general layer */
42 #include "ssi.x"           /* system services */
43 #include "cm_lib.x"        /* Common library */
44 #include "cm_mblk.x"       /* Typedef file */
45
46 #ifdef SS_LOCKLESS_MEMORY
47 EXTERN pthread_t tmpRegTidMap[20];
48 #define CM_MEM_GET_REGION(_region)                        \
49 {                                                         \
50    U8  _regCnt;                                           \
51    _region = 0xFF;                                        \
52                                                           \
53    for(_regCnt = 0; _regCnt < 12; _regCnt++)              \
54    {                                                      \
55       if(tmpRegTidMap[_regCnt] == pthread_self())         \
56       {                                                   \
57          _region = _regCnt;                               \
58          break;                                           \
59       }                                                   \
60    }                                                      \
61 }
62 #endif
63
64
65
66 PRIVATE Void cmAddMemNode ARGS((CmMemListCp *lCp,CmMemList *node)); 
67
68 \f
69 /*
70 *
71 *       Fun:   cmAllocEvnt
72 *
73 *       Desc:  This function allocates the first memory chunk,
74 *              which contains CmMemListCp structure at the top,
75 *              parcels the requested event structure out of this
76 *              chunk and return to the user.
77 *
78 *       Ret:   ROK 
79 *
80 *       Notes: None 
81 *
82 *       File:  cm_mblk.c
83 *
84 */
85   
86 #ifdef ANSI
87 PUBLIC S16 cmAllocEvnt
88 (
89 Size            evntSize,    /* Size of the Event structure */
90 Size            maxBlkSize,  /* Chunk Memory size */
91 Mem             *sMem,       /* Static memory region and pool */
92 Ptr             *ptr         /* Location to place allocated event ptr */
93 )
94 #else
95 PUBLIC S16 cmAllocEvnt (evntSize,maxBlkSize,sMem,ptr)
96 Size            evntSize;   /* Size of the Event structure */
97 Size            maxBlkSize; /* Memory size requested */
98 Mem             *sMem;      /* Static Memory region and pool */
99 Ptr             *ptr;       /* Location to place allocated event ptr */
100 #endif
101 {
102
103   Data          *allocPtr;  /* Allocated Memory Pointer */
104   CmMemList     *node;      /* Memory Link List Node */
105   CmMemListCp   *memCp;     /* memory Link list control point */
106   CmMemCb       *cb;        /* Allocated Memory Control Block */
107
108   TRC2(cmAllocEvnt)
109
110   /* Validation check */
111 #ifndef LTE_ENB_PAL
112   if( evntSize > maxBlkSize)
113   {
114      printf("\nNot Allocating memory for Event\n");
115 #ifdef ALIGN_64BIT
116      printf("eventSize [%d] greater than maxBlkSize [%d]\n",
117            evntSize, maxBlkSize);
118 #else
119      printf("eventSize [%ld] greater than maxBlkSize [%ld]\n",
120            evntSize, maxBlkSize);
121 #endif
122      return RFAILED;
123   }
124 #endif
125  
126   /* Allocate memory for the first Memory Chunk */
127   /* Allocated memory should be maxBlkSize + sizeof(CmMemList) */
128 #ifdef SS_LOCKLESS_MEMORY
129    if(SGetStaticBuffer(sMem->region, sMem->pool, (Data **)&allocPtr,
130                        (Size)(maxBlkSize + sizeof(CmMemList)), 0) != ROK)
131 #else
132   if (SGetSBuf(sMem->region, sMem->pool, 
133                (Data **)&allocPtr, 
134                (Size)(maxBlkSize + sizeof(CmMemList))) != ROK)
135 #endif /* SS_LOCKLESS_MEMORY */
136
137      return RFAILED;
138
139   /* Reset the contents */
140   cmMemset((U8 *)allocPtr, (U8 )0, 
141            (PTR)(maxBlkSize + sizeof(CmMemList)) );
142
143   /* The above allocated memory chunk is structured as follows 
144
145   +-------------------+
146   |  CmMemList        |
147   +-------------------+   <---- Event Structure begins here
148   |  CmMemListCp      |      ^
149   +-------------------+      |
150   |  Event data part  |      |  evntSize
151   +-------------------+      |
152        ....                  |
153        ....                  \/ 
154   +-------------------+    
155   
156   */
157
158   /* Overlay CmMemList structure on top of this allocated chunk */
159   node = (CmMemList *)allocPtr;
160   /* cm_mblk_c_001.101: update size value */
161   node->size = maxBlkSize;
162
163   /* Get to CmMemListCp start */
164   memCp = (CmMemListCp *) ((PTR)allocPtr + sizeof(CmMemList));
165   
166   /* Initialise memListCp */
167   CM_INIT_MEMCP( memCp,maxBlkSize,sMem);
168
169   /* Add link list node to link list */
170   cmAddMemNode(memCp, node); 
171
172   /* Get pointer to memCb inside MemListCp */
173   cb = (CmMemCb *)&(memCp->memCb);
174
175   /* Align evntSize, if necessary */
176   CM_ALIGN_SIZE(evntSize);
177
178   cb->memAllocated = (evntSize + sizeof(CmMemList) );
179   cb->initPtr = (PTR)allocPtr;
180   *ptr = (Ptr) ((PTR)allocPtr + sizeof(CmMemList));
181   cb->runPtr = ((PTR)(*ptr) + evntSize);
182
183   return ROK;
184
185 } /* End of cmAllocEvnt */
186
187 \f
188 /*
189 *
190 *       Fun:   cmInitMemCp
191 *
192 *       Desc:  This function intialises Memory Link List
193 *              Control point  
194 *
195 *       Ret:   ROK 
196 *
197 *       Notes: None 
198 *
199 *       File:  cm_mblk.c
200 *
201 */
202   
203 #ifdef ANSI
204 PUBLIC Void cmInitMemCp
205 (
206 CmMemListCp     *memCp,     /* Memory control pointer */
207 Size            maxBlkSize, /* Chunk Memory size */
208 Mem             *sMem       /* Static memory region and pool */
209 )
210 #else
211 PUBLIC Void cmInitMemCp (memCp,maxBlkSize,sMem)
212 CmMemListCp     *memCp;     /* Memory control pointer */
213 Size            maxBlkSize; /* Memory size requested */
214 Mem             *sMem;      /* Static Memory region and pool */
215 #endif
216 {
217
218   TRC2(cmInitMemCp)
219
220   /* Intialise Memory Control Point */
221   CM_INIT_MEMCP(memCp,maxBlkSize,sMem);
222
223   RETVOID;
224
225 } /* End of cmInitMemCp */ 
226
227 \f
228 /*
229 *
230 *       Fun:   cmGetMem
231 *
232 *       Desc:  This function parcels memory from memory chunks 
233 *              It allocated big chunk as and when required
234 *
235 *       Ret:   ROK 
236 *
237 *       Notes: None 
238 *
239 *       File:  cm_mblk.c
240 *
241 */
242   
243 #ifdef ANSI
244 PUBLIC S16 cmGetMem
245 (
246 Ptr           memPtr,    /* Pointer to memCp */
247 Size          size,      /* Memory size requested */
248 Ptr           *allocPtr  /* location to place pointer */
249 )
250 #else
251 PUBLIC S16 cmGetMem (memPtr,size,allocPtr)
252 Ptr          memPtr;    /* Pointer to memCp */
253 Size         size;      /* Memory size requested */
254 Ptr          *allocPtr; /* location to place pointer */
255 #endif
256 {
257  
258   CmMemCb   *cb;       /* Pointer to Memory Control Block */
259   CmMemList *node;     /* Memory List node */
260   CmMemListCp *memCp;  /* Memory Control Point */
261   /* cm_mblk_c_001.101: added local variable */
262   Size       blkSize;  /* required block size */
263
264   TRC2(cmGetMem)
265
266   memCp = (CmMemListCp *)memPtr;
267   cb = &memCp->memCb; 
268
269   /* Make requested size aligned, if necessary */
270   CM_ALIGN_SIZE(size);
271
272   /* cm_mblk_c_001.101 : If the requested size is greater than the configured
273    * max size, then allocate a new block with the requested size. This will
274    * enable us to handle large allocation requests in H.323 stack for certain
275    * information elements. This will not impact any normal allocation request
276    * as we fall back to the configured size */
277    if( size > cb->maxSize)
278      blkSize = size;
279    else
280      blkSize = cb->maxSize;
281  
282   if( cb->initPtr)
283   { 
284     /* if a chunk is already there */
285     if( (cb->memAllocated + size) <= 
286            (U32)(cb->maxSize + sizeof(CmMemList)) )
287     {
288       /* Requested memory is available in present chunk */
289       *allocPtr = (Ptr) cb->runPtr;
290       cb->memAllocated += size;
291       cb->runPtr += size;
292       return ROK;
293     }
294   }
295   
296   /* For all other cases, We need to allocate a new memory chunk */
297   /* Allocate buffer */
298   /* cm_mblk_c_001.101: use blkSize instead of cb->maxSize */
299 #ifdef SS_LOCKLESS_MEMORY
300    if(SGetStaticBuffer(cb->sMem.region, cb->sMem.pool, 
301                        (Data **)&(cb->initPtr),
302                        (Size)(blkSize + sizeof(CmMemList)), 0) != ROK)
303 #else
304   if (SGetSBuf(cb->sMem.region, cb->sMem.pool, 
305               (Data **)&(cb->initPtr),
306               (Size)(blkSize + sizeof(CmMemList)) )  != ROK)
307 #endif /* SS_LOCKLESS_MEMORY */
308      return RFAILED;
309
310   /* Reset the contents */
311   /* Initialise above allocated structure */
312   /* cm_mblk_c_001.101: use blkSize instead of cb->maxSize */
313   cmMemset((U8 *)cb->initPtr, (U8 )0, 
314            (PTR)(blkSize + sizeof(CmMemList) ));
315
316   /* The above allocated memory chunk is structured as follows 
317
318   +-------------------+
319   |  CmMemList        |
320   +-------------------+
321       Data Portion
322        ....
323        ....
324   +-------------------+    */
325
326   /* Overlay CmMemList structure on top of this allocated chunk */
327   node = (CmMemList *)cb->initPtr;
328   /* cm_mblk_c_001.101: update size */
329   node->size = blkSize;
330
331   /* Add link list node to link list */
332   cmAddMemNode(memCp, node); 
333
334   cb->memAllocated = (size + sizeof(CmMemList) );
335   *allocPtr = (Ptr) ((PTR)cb->initPtr + sizeof(CmMemList));
336   cb->runPtr = ((PTR)(*allocPtr) + size);
337
338   return ROK;   
339
340 } /* End of cmGetMem */
341
342
343 #ifdef TFU_ALLOC_EVENT_NO_INIT
344 \f
345 /*
346 *
347 *       Fun:   cmAllocEvntNoInit
348 *
349 *       Desc:  This function allocates the first memory chunk,
350 *              which contains CmMemListCp structure at the top,
351 *              parcels the requested event structure out of this
352 *              chunk and return to the user.
353 *
354 *       Ret:   ROK 
355 *
356 *       Notes: None 
357 *
358 *       File:  cm_mblk.c
359 *
360 */
361   
362 #ifdef ANSI
363 PUBLIC S16 cmAllocEvntNoInit
364 (
365 Size            evntSize,    /* Size of the Event structure */
366 Size            maxBlkSize,  /* Chunk Memory size */
367 Mem             *sMem,       /* Static memory region and pool */
368 Ptr             *ptr         /* Location to place allocated event ptr */
369 )
370 #else
371 PUBLIC S16 cmAllocEvntNoInit (evntSize,maxBlkSize,sMem,ptr)
372 Size            evntSize;   /* Size of the Event structure */
373 Size            maxBlkSize; /* Memory size requested */
374 Mem             *sMem;      /* Static Memory region and pool */
375 Ptr             *ptr;       /* Location to place allocated event ptr */
376 #endif
377 {
378
379   Data          *allocPtr;  /* Allocated Memory Pointer */
380   CmMemList     *node;      /* Memory Link List Node */
381   CmMemListCp   *memCp;     /* memory Link list control point */
382   CmMemCb       *cb;        /* Allocated Memory Control Block */
383
384   TRC2(cmAllocEvntNoInit)
385
386   /* Validation check */
387   if( evntSize > maxBlkSize)
388      return RFAILED;
389  
390   /* Allocate memory for the first Memory Chunk */
391   /* Allocated memory should be maxBlkSize + sizeof(CmMemList) */
392 #ifdef SS_LOCKLESS_MEMORY
393    if(SGetStaticBuffer(sMem->region, sMem->pool, (Data **)&allocPtr,
394                        (Size)(maxBlkSize + sizeof(CmMemList)), 0) != ROK)
395 #else
396   if (SGetSBuf(sMem->region, sMem->pool, 
397                (Data **)&allocPtr, 
398                (Size)(maxBlkSize + sizeof(CmMemList))) != ROK)
399 #endif /* SS_LOCKLESS_MEMORY */
400
401      return RFAILED;
402
403   /* Reset the contents */
404   cmMemset((U8 *)allocPtr, (U8 )0, 
405            (PTR)(sizeof(CmMemList)) );
406
407   /* The above allocated memory chunk is structured as follows 
408
409   +-------------------+
410   |  CmMemList        |
411   +-------------------+   <---- Event Structure begins here
412   |  CmMemListCp      |      ^
413   +-------------------+      |
414   |  Event data part  |      |  evntSize
415   +-------------------+      |
416        ....                  |
417        ....                  \/ 
418   +-------------------+    
419   
420   */
421
422   /* Overlay CmMemList structure on top of this allocated chunk */
423   node = (CmMemList *)allocPtr;
424   /* cm_mblk_c_001.101: update size value */
425   node->size = maxBlkSize;
426
427   /* Get to CmMemListCp start */
428   memCp = (CmMemListCp *) ((PTR)allocPtr + sizeof(CmMemList));
429   
430   /* Initialise memListCp */
431   CM_INIT_MEMCP( memCp,maxBlkSize,sMem);
432
433   /* Add link list node to link list */
434   cmAddMemNode(memCp, node); 
435
436   /* Get pointer to memCb inside MemListCp */
437   cb = (CmMemCb *)&(memCp->memCb);
438
439   /* Align evntSize, if necessary */
440   CM_ALIGN_SIZE(evntSize);
441
442   cb->memAllocated = (evntSize + sizeof(CmMemList) );
443   cb->initPtr = (PTR)allocPtr;
444   *ptr = (Ptr) ((PTR)allocPtr + sizeof(CmMemList));
445   cb->runPtr = ((PTR)(*ptr) + evntSize);
446
447   return ROK;
448
449 } /* End of cmAllocEvntNoInit */
450
451 /*
452 *
453 *       Fun:   cmGetMemNoInit
454 *
455 *       Desc:  This function parcels memory from memory chunks 
456 *              It allocated big chunk as and when required
457 *
458 *       Ret:   ROK 
459 *
460 *       Notes: None 
461 *
462 *       File:  cm_mblk.c
463 *
464 */
465   
466 #ifdef ANSI
467 PUBLIC S16 cmGetMemNoInit
468 (
469 Ptr           memPtr,    /* Pointer to memCp */
470 Size          size,      /* Memory size requested */
471 Ptr           *allocPtr  /* location to place pointer */
472 )
473 #else
474 PUBLIC S16 cmGetMemNoInit (memPtr,size,allocPtr)
475 Ptr          memPtr;    /* Pointer to memCp */
476 Size         size;      /* Memory size requested */
477 Ptr          *allocPtr; /* location to place pointer */
478 #endif
479 {
480  
481   CmMemCb   *cb;       /* Pointer to Memory Control Block */
482   CmMemList *node;     /* Memory List node */
483   CmMemListCp *memCp;  /* Memory Control Point */
484   /* cm_mblk_c_001.101: added local variable */
485   Size       blkSize;  /* required block size */
486
487   TRC2(cmGetMemNoInit)
488
489   memCp = (CmMemListCp *)memPtr;
490   cb = &memCp->memCb; 
491
492   /* Make requested size aligned, if necessary */
493   CM_ALIGN_SIZE(size);
494
495   /* cm_mblk_c_001.101 : If the requested size is greater than the configured
496    * max size, then allocate a new block with the requested size. This will
497    * enable us to handle large allocation requests in H.323 stack for certain
498    * information elements. This will not impact any normal allocation request
499    * as we fall back to the configured size */
500    if( size > cb->maxSize)
501      blkSize = size;
502    else
503      blkSize = cb->maxSize;
504  
505   if( cb->initPtr)
506   { 
507     /* if a chunk is already there */
508     if( (cb->memAllocated + size) <= 
509            (U32)(cb->maxSize + sizeof(CmMemList)) )
510     {
511       /* Requested memory is available in present chunk */
512       *allocPtr = (Ptr) cb->runPtr;
513       //cmMemset((U8 *)*allocPtr, (U8 )0, 
514         //   (PTR)(size) );
515       cb->memAllocated += size;
516       cb->runPtr += size;
517       return ROK;
518     }
519   }
520   
521   /* For all other cases, We need to allocate a new memory chunk */
522   /* Allocate buffer */
523   /* cm_mblk_c_001.101: use blkSize instead of cb->maxSize */
524 #ifdef SS_LOCKLESS_MEMORY
525    if(SGetStaticBuffer(cb->sMem.region, cb->sMem.pool, 
526                        (Data **)&(cb->initPtr),
527                        (Size)(blkSize + sizeof(CmMemList)), 0) != ROK)
528 #else
529   if (SGetSBuf(cb->sMem.region, cb->sMem.pool, 
530               (Data **)&(cb->initPtr),
531               (Size)(blkSize + sizeof(CmMemList)) )  != ROK)
532 #endif /* SS_LOCKLESS_MEMORY */
533      return RFAILED;
534
535   /* Reset the contents */
536   /* Initialise above allocated structure */
537   /* cm_mblk_c_001.101: use blkSize instead of cb->maxSize */
538   cmMemset((U8 *)cb->initPtr, (U8 )0, 
539            (PTR)(sizeof(CmMemList)));
540   /* The above allocated memory chunk is structured as follows 
541
542   +-------------------+
543   |  CmMemList        |
544   +-------------------+
545       Data Portion
546        ....
547        ....
548   +-------------------+    */
549
550   /* Overlay CmMemList structure on top of this allocated chunk */
551   node = (CmMemList *)cb->initPtr;
552   /* cm_mblk_c_001.101: update size */
553   node->size = blkSize;
554
555   /* Add link list node to link list */
556   cmAddMemNode(memCp, node); 
557
558   cb->memAllocated = (size + sizeof(CmMemList) );
559   *allocPtr = (Ptr) ((PTR)cb->initPtr + sizeof(CmMemList));
560   cb->runPtr = ((PTR)(*allocPtr) + size);
561
562   return ROK;   
563
564 } /* End of cmGetMemNoInit */
565
566
567
568
569 #endif
570 \f
571 /*
572 *
573 *       Fun:   cmFreeMem
574 *
575 *       Desc:  This function frees memory chunks after
576 *              traversing link list
577 *
578 *       Ret:   ROK 
579 *
580 *       Notes: None 
581 *
582 *       File:  cm_mblk.c
583 *
584 */
585   
586 #ifdef ANSI
587 PUBLIC Void cmFreeMem
588 (
589 Ptr    memPtr      /* Link List CP */
590 )
591 #else
592 PUBLIC Void cmFreeMem (memPtr)
593 Ptr    memPtr;     /* Link List CP */
594 #endif
595 {
596   Mem         sMem;      /* Static Memory region and pool */
597   S32         count;     /* Count of linked blocks */ 
598   /* cm_mblk_c_001.101: removed local variable maxSize */
599   CmMemList   *node;     /* Pointer to link list node */
600   CmMemList   *prevNode; /* Pointer to previous node */
601   CmMemListCp *lcp;      /* Memory Link List */
602
603   TRC2(cmFreeMem)
604
605   lcp = (CmMemListCp *)memPtr;
606
607   sMem.region = lcp->memCb.sMem.region;
608   sMem.pool   = lcp->memCb.sMem.pool;
609   count       = lcp->count; 
610   /* cm_mblk_c_001.101: removed getting maxSize value */
611
612   /* Free Memory by traversing Back to Front */
613   node = lcp->last;
614
615   /* Initialise memCp running variables */
616   /* User may want to reuse same memCp for further */
617   /* allocations, if memCp was not a part of */
618   /* event structure */
619   CM_INIT_MEMCPVAR(lcp);
620
621   while(count && node)
622   {
623     prevNode = node->prev;
624
625     /* Release complete memory for present chunk */
626     /* cm_mblk_c_001.101: use node->size instead of maxSize */
627     if( node )
628     {
629 #ifdef SS_LOCKLESS_MEMORY
630        SPutStaticBuffer(sMem.region, sMem.pool,
631                         (Data *)node, (node->size + sizeof(CmMemList)), 0);
632 #else
633        SPutSBuf(sMem.region,sMem.pool, 
634                 (Data *)node, (node->size + sizeof(CmMemList)));
635 #endif /* SS_LOCKLESS_MEMORY */
636     }
637     node = prevNode;
638     count--;
639   }
640
641   RETVOID;   
642
643 } /* End of cmFreeMem */
644
645 \f
646 /*
647 *
648 *       Fun:   cmAddMemNode
649 *
650 *       Desc:  adds node to Memory linked list after last.
651 *
652 *       Ret:   ROK   - ok
653 *
654 *       Notes: None
655 *
656 *       File:  cm_mblk.c
657 *
658 */
659 #ifdef ANSI
660 PRIVATE Void cmAddMemNode
661 (
662 CmMemListCp *lCp,               /* list control point */
663 CmMemList   *node               /* node to be added */
664 )
665 #else 
666 PRIVATE Void cmAddMemNode (lCp, node)
667 CmMemListCp *lCp;               /* list control point */
668 CmMemList   *node;              /* node to be added */
669 #endif
670 {
671    TRC3(cmAddMemNode);
672
673    lCp->count++;
674
675    node->prev = lCp->last;
676    node->next = NULLP;
677    lCp->last = node;
678    
679    if (!node->prev)
680    {
681       lCp->first = node;
682       RETVOID;
683    }
684    
685    node->prev->next = node;
686    RETVOID;
687
688 } /* end of cmAddMemNode */
689
690
691 \f
692 /*
693 *
694 *       Fun:   cmGetMemStatus
695 *
696 *       Desc:  This function returns the static memory status with
697 *              parameters such as memory  region and pool etc
698 *
699 *       Ret:   ROK 
700 *
701 *       Notes: None 
702 *
703 *       File:  cm_mblk.c
704 *
705 */
706   
707 #ifdef ANSI
708 PUBLIC Void cmGetMemStatus
709 (
710 Ptr             memPtr,    /* Memory control pointer */
711 CmMemStatus     *status    /* memory region,pool and status */
712 )
713 #else
714 PUBLIC Void cmGetMemStatus (memPtr,status)
715 Ptr             memPtr;   /* Memory control pointer */
716 CmMemStatus     *status;  /* memory region,pool and status */
717 #endif
718 {
719
720   CmMemListCp *memCp;    /* Memory Link List */
721
722   TRC3(cmGetMemStatus)
723
724   memCp = (CmMemListCp *)memPtr;
725
726   /* Copy relevant parameters */
727   status->sMem.region  = memCp->memCb.sMem.region;
728   status->sMem.pool    = memCp->memCb.sMem.pool;
729   status->memBlkCnt    = memCp->count;
730   status->maxBlkSize   = memCp->memCb.maxSize;
731   status->memAllocated = memCp->memCb.memAllocated;
732
733   RETVOID;
734
735 } /* End of cmGetMemStatus */ 
736
737 /**********************************************************************
738          End of file
739 **********************************************************************/