1/* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 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 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18#ifndef OSCL_MEM_BASIC_FUNCTIONS_INL 19#define OSCL_MEM_BASIC_FUNCTIONS_INL 20 21#ifndef OSCLCONFIG_MEMORY_H_INCLUDED 22#include "osclconfig_memory.h" 23#endif 24 25#ifndef OSCL_MEM_BASIC_FUNCTIONS_H 26#include "oscl_mem_basic_functions.h" 27#endif 28 29// Basic memory manipulation functions 30#define OSCL_DISABLE_WARNING_TRUNCATE_DEBUG_MESSAGE 31#include "osclconfig_compiler_warnings.h" 32 33OSCL_INLINE OSCL_COND_EXPORT_REF void* _oscl_malloc(int32 size) 34{ 35 return malloc(size); 36} 37 38OSCL_INLINE OSCL_COND_EXPORT_REF void* _oscl_realloc(void* src, int32 size) 39{ 40 return realloc(src, size); 41} 42 43OSCL_INLINE OSCL_COND_EXPORT_REF void* _oscl_calloc(int32 size1, int32 size2) 44{ 45 return calloc(size1, size2); 46} 47 48OSCL_INLINE OSCL_COND_EXPORT_REF void _oscl_free(void* src) 49{ 50 free(src); 51} 52 53OSCL_INLINE OSCL_COND_EXPORT_REF void* oscl_memcpy(void* dest, const void* src, uint32 count) 54{ 55 return memcpy(dest, src, count); 56} 57 58OSCL_INLINE OSCL_COND_EXPORT_REF void* oscl_memmove(void* dest, const void* src, uint32 count) 59{ 60 return memmove(dest, src, count); 61} 62 63OSCL_INLINE OSCL_COND_EXPORT_REF void* oscl_memmove32(void* dest, const void* src, uint32 count) 64{ 65 return memmove(dest, src, count); 66} 67 68OSCL_INLINE OSCL_COND_EXPORT_REF void* oscl_memset(void* dest, uint8 val, uint32 count) 69{ 70 return memset(dest, val, count); 71} 72 73OSCL_INLINE OSCL_COND_EXPORT_REF int oscl_memcmp(const void* dest, const void* src, uint32 count) 74{ 75 return memcmp(dest, src, count); 76} 77 78#endif /*OSCL_MEM_BASIC_FUNCTIONS_INL*/ 79 80