There was an error while loading. Please reload this page.
1 parent 98906eb commit b07bd3bCopy full SHA for b07bd3b
1 file changed
rpcs3/Loader/ISO.cpp
@@ -39,6 +39,9 @@ static void* get_aligned_buf()
39
// IMPORTANT NOTE: It must be aligned (probably enough on multiple of 4) to support raw device, otherwise any read from file will fail
40
#if defined(_WIN32)
41
buf = _aligned_malloc(ISO_SECTOR_SIZE, ISO_SECTOR_SIZE * 2);
42
+#elif defined(__APPLE__)
43
+ constexpr size_t NativeAlign = std::max(static_cast<size_t>(ISO_SECTOR_SIZE * 2), sizeof(void*));
44
+ buf = std::aligned_alloc(NativeAlign, (ISO_SECTOR_SIZE + (NativeAlign - 1)) & ~(NativeAlign - 1));
45
#else
46
buf = std::aligned_alloc(ISO_SECTOR_SIZE * 2, ISO_SECTOR_SIZE);
47
#endif
0 commit comments