1/* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16/** 17 ************************************************************************ 18 * @file M4OSA_Memory.h 19 * @ingroup OSAL 20 * @brief Memory allocation 21 * @note This file defines function prototypes to allocate 22 * and free memory. 23 ************************************************************************ 24*/ 25 26#ifndef M4OSA_MEMORY_H 27#define M4OSA_MEMORY_H 28 29 30#include "M4OSA_Types.h" 31#include "M4OSA_Error.h" /*for M4OSA_CoreID definition*/ 32 33typedef M4OSA_Int32* M4OSA_MemAddr32; 34typedef M4OSA_Int8* M4OSA_MemAddr8; 35 36#ifdef __cplusplus 37extern "C" 38{ 39#endif 40 41M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_MemAddr32 M4OSA_32bitAlignedMalloc (M4OSA_UInt32 size, 42 M4OSA_CoreID coreID, 43 M4OSA_Char* string); 44 45M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_ERR M4OSA_randInit(void); 46 47 48M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_ERR M4OSA_rand(M4OSA_Int32* out_value, 49 M4OSA_UInt32 max_value); 50 51 52#ifdef __cplusplus 53} 54#endif 55 56#endif 57 58