nfa_mem_co.h revision e9df6ba5a8fcccf306a80b1670b423be8fe7746a
1/****************************************************************************** 2 * 3 * Copyright (C) 2010-2012 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/***************************************************************************** 35** External Function Declarations 36*****************************************************************************/ 37#ifdef __cplusplus 38extern "C" 39{ 40#endif 41 42/******************************************************************************* 43** 44** Function nfa_mem_co_alloc 45** 46** Description allocate a buffer from platform's memory pool 47** 48** Returns: 49** pointer to buffer if successful 50** NULL otherwise 51** 52*******************************************************************************/ 53NFC_API extern void *nfa_mem_co_alloc (UINT32 num_bytes); 54 55 56/******************************************************************************* 57** 58** Function nfa_mem_co_free 59** 60** Description free buffer previously allocated using nfa_mem_co_alloc 61** 62** Returns: 63** Nothing 64** 65*******************************************************************************/ 66NFC_API extern void nfa_mem_co_free (void *p_buf); 67 68 69#ifdef __cplusplus 70} 71#endif 72 73#endif /* NFA_MEM_CO_H */ 74 75