From 0fe3d16246b0ddd30b76757056d43ea57bebd234 Mon Sep 17 00:00:00 2001 From: ChenHengming Date: Wed, 5 Aug 2015 02:26:32 +0000 Subject: [PATCH] [rk_malloc]: add rk_malloc on Android git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@29 6e48237b-75ef-9749-8fc9-41990f28c85a --- osal/android/os_malloc.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 osal/android/os_malloc.c diff --git a/osal/android/os_malloc.c b/osal/android/os_malloc.c new file mode 100644 index 00000000..19f648f6 --- /dev/null +++ b/osal/android/os_malloc.c @@ -0,0 +1,29 @@ +/* + * Copyright 2010 Rockchip Electronics S.LSI Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "os_malloc.h" + +int os_malloc(void **memptr, size_t alignment, size_t size) +{ + return posix_memalign(memptr, alignment, size); +} + +void os_free(void *ptr) +{ + free(ptr); +} +