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 * Callout functions for memory allocation/deallocatoin 22 * 23 ******************************************************************************/ 24 #ifndef NFA_MEM_CO_H 25 #define NFA_MEM_CO_H 26 27 #include "nfc_target.h" 28 29 /***************************************************************************** 30 ** Constants and data types 31 *****************************************************************************/ 32 33 /***************************************************************************** 34 ** External Function Declarations 35 *****************************************************************************/ 36 37 /******************************************************************************* 38 ** 39 ** Function nfa_mem_co_alloc 40 ** 41 ** Description allocate a buffer from platform's memory pool 42 ** 43 ** Returns: 44 ** pointer to buffer if successful 45 ** NULL otherwise 46 ** 47 *******************************************************************************/ 48 extern void* nfa_mem_co_alloc(uint32_t num_bytes); 49 50 /******************************************************************************* 51 ** 52 ** Function nfa_mem_co_free 53 ** 54 ** Description free buffer previously allocated using nfa_mem_co_alloc 55 ** 56 ** Returns: 57 ** Nothing 58 ** 59 *******************************************************************************/ 60 extern void nfa_mem_co_free(void* p_buf); 61 62 #endif /* NFA_MEM_CO_H */ 63