• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  *  Copyright (C) 2010-2014 Broadcom Corporation
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 /******************************************************************************
21  *
22  *  Callout functions for memory allocation/deallocatoin
23  *
24  ******************************************************************************/
25 #ifndef NFA_MEM_CO_H
26 #define NFA_MEM_CO_H
27 
28 #include "nfc_target.h"
29 
30 /*****************************************************************************
31 **  Constants and data types
32 *****************************************************************************/
33 
34 
35 /*****************************************************************************
36 **  External Function Declarations
37 *****************************************************************************/
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42 
43 /*******************************************************************************
44 **
45 ** Function         nfa_mem_co_alloc
46 **
47 ** Description      allocate a buffer from platform's memory pool
48 **
49 ** Returns:
50 **                  pointer to buffer if successful
51 **                  NULL otherwise
52 **
53 *******************************************************************************/
54 NFC_API extern void *nfa_mem_co_alloc (UINT32 num_bytes);
55 
56 
57 /*******************************************************************************
58 **
59 ** Function         nfa_mem_co_free
60 **
61 ** Description      free buffer previously allocated using nfa_mem_co_alloc
62 **
63 ** Returns:
64 **                  Nothing
65 **
66 *******************************************************************************/
67 NFC_API extern void nfa_mem_co_free (void *p_buf);
68 
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* NFA_MEM_CO_H */
75 
76