mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-25 18:10:21 +08:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user