diff options
| author | Ryan Houdek <Sonicadvance1@Gmail.com> | 2013-02-27 02:22:08 +0000 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@Gmail.com> | 2013-02-27 02:22:08 +0000 |
| commit | 692e39d1bbe14f0c84e1d0e98e578534d1f1d656 (patch) | |
| tree | 1dfec903910553e323f6b04b510c315fc8a3caed /Source/Core/Common/Src/MemoryUtil.cpp | |
| parent | a680d17eef88646b8cd6018c1c5e8f0e39d056ee (diff) | |
| parent | be7643cd2d1a27324070550ad82eca2c3bd59f19 (diff) | |
Merge branch 'arm-noglsl'
Diffstat (limited to 'Source/Core/Common/Src/MemoryUtil.cpp')
| -rw-r--r-- | Source/Core/Common/Src/MemoryUtil.cpp | 5 |
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,
|
