summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/MemoryUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/Src/MemoryUtil.cpp')
-rw-r--r--Source/Core/Common/Src/MemoryUtil.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/Common/Src/MemoryUtil.cpp b/Source/Core/Common/Src/MemoryUtil.cpp
index 0888746d42..ff50347799 100644
--- a/Source/Core/Common/Src/MemoryUtil.cpp
+++ b/Source/Core/Common/Src/MemoryUtil.cpp
@@ -117,9 +117,12 @@ void* AllocateAlignedMemory(size_t size,size_t alignment)
void* ptr = _aligned_malloc(size,alignment);
#else
void* ptr = NULL;
+#ifdef ANDROID
+ ptr = memalign(alignment, size);
+#else
if (posix_memalign(&ptr, alignment, size) != 0)
ERROR_LOG(MEMMAP, "Failed to allocate aligned memory");
-;
+#endif
#endif
// printf("Mapped memory at %p (size %ld)\n", ptr,