[Android] Remove posix_memalign workaround.
Google fixed the issue of posix_memalign not being available. It now works fine in r10d of the NDK.
This commit is contained in:
parent
37a770bb9f
commit
08e50ec6dd
|
@ -115,12 +115,8 @@ void* AllocateAlignedMemory(size_t size,size_t alignment)
|
||||||
void* ptr = _aligned_malloc(size,alignment);
|
void* ptr = _aligned_malloc(size,alignment);
|
||||||
#else
|
#else
|
||||||
void* ptr = nullptr;
|
void* ptr = nullptr;
|
||||||
#ifdef ANDROID
|
|
||||||
ptr = memalign(alignment, size);
|
|
||||||
#else
|
|
||||||
if (posix_memalign(&ptr, alignment, size) != 0)
|
if (posix_memalign(&ptr, alignment, size) != 0)
|
||||||
ERROR_LOG(MEMMAP, "Failed to allocate aligned memory");
|
ERROR_LOG(MEMMAP, "Failed to allocate aligned memory");
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// printf("Mapped memory at %p (size %ld)\n", ptr,
|
// printf("Mapped memory at %p (size %ld)\n", ptr,
|
||||||
|
|
Loading…
Reference in New Issue