[android os alloc] no used posix_memalign in android may be cause mem leak,when mem no align

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@720 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenSiyong
2016-05-11 04:35:00 +00:00
parent 8fda6c306d
commit 526b4c9388

View File

@@ -19,7 +19,16 @@
int os_malloc(void **memptr, size_t alignment, size_t size)
{
return posix_memalign(memptr, alignment, size);
int ret = 0;
void *ptr = malloc(size);
if (ptr) {
*memptr = ptr;
} else {
*memptr = NULL;
ret = -1;
}
return ret;
//return posix_memalign(memptr, alignment, size);
}
int os_realloc(void *src, void **dst, size_t alignment, size_t size)