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#ifdef __cplusplus 37extern "C" { 38#endif 39 40/******************************************************************************* 41** 42** Function nfa_mem_co_alloc 43** 44** Description allocate a buffer from platform's memory pool 45** 46** Returns: 47** pointer to buffer if successful 48** NULL otherwise 49** 50*******************************************************************************/ 51extern void* nfa_mem_co_alloc(uint32_t num_bytes); 52 53/******************************************************************************* 54** 55** Function nfa_mem_co_free 56** 57** Description free buffer previously allocated using nfa_mem_co_alloc 58** 59** Returns: 60** Nothing 61** 62*******************************************************************************/ 63extern void nfa_mem_co_free(void* p_buf); 64 65#ifdef __cplusplus 66} 67#endif 68 69#endif /* NFA_MEM_CO_H */ 70