Adding new commiter to ODU-High repo
[o-du/l2.git] / src / mt / ss_mem.h
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 /********************************************************************20**
20  
21      Name:     System Services -- Memory management interface
22  
23      Type:     C include file
24  
25      Desc:     Various macro definitions required for the Memory
26                management interface.
27  
28      File:     ss_mem.h
29  
30 *********************************************************************21*/
31
32
33 #ifndef __SSMEMH__
34 #define __SSMEMH__
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40
41
42 /* region flags */
43 #define SS_OUTBOARD_FLAG        16
44
45 /* ss036.103 - addition of a macro. This implies that we
46 * can hold the memory statistics of upto SS_MAX_BKT_PER_DBGTBL buckets
47 */
48 #define SS_MAX_BKT_PER_DBGTBL   16
49
50 /* ss036.103 - addition of macros for memory statistics related information */
51 #ifdef SSI_DEBUG_LEVEL1
52 #define SS_DYNAMIC_MEM_FLAG     0x04 /* same as CMM_DYNAMIC_MEM_FLAG */
53 #define SS_STATIC_MEM_FLAG      0x08 /* same as CMM_STATIC_MEM_FLAG */
54 #define SS_MEM_BLK_SIZE_PROFILE    0  /* to print size vs. numRequests */
55 #define SS_MEM_BKT_ALLOC_PROFILE   1  /* to print the static/dynamic mem used */
56 #endif /* SSI_DEBUG_LEVEL1 */
57
58 /* ss001.301: FAP related changes in SSI */
59 #ifdef SS_FAP
60 #define SAlloc(_region, _size,_flags, _ptr) \
61            ((osCp.regionTbl[(_region)].alloc)((osCp.regionTbl[(_region)].regCb), (_size), (_flags),(_ptr)))
62 #define SFree(_region, _ptr, _size) \
63            (osCp.regionTbl[(_region)].free)(\
64            (osCp.regionTbl[(_region)].regCb), ( _ptr), (_size))
65
66 #endif
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif  /*  __SSMEMH__  */
73
74
75 \f  
76 /********************************************************************30**
77
78          End of file
79 **********************************************************************/