We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 964a51f commit cc6f53eCopy full SHA for cc6f53e
stdlib/public/runtime/Heap.cpp
@@ -32,10 +32,11 @@ using namespace swift;
32
/// On Apple platforms, \c malloc() is always 16-byte aligned.
33
static constexpr size_t MALLOC_ALIGN_MASK = 15;
34
35
-#elif defined(__linux__) || defined(_WIN32)
+#elif defined(__linux__) || defined(_WIN32) || defined(__wasi__)
36
/// On Linux and Windows, \c malloc() returns 16-byte aligned pointers on 64-bit
37
/// and 8-byte aligned pointers on 32-bit.
38
-#if defined(__LP64) || defined(_WIN64)
+/// On wasi-libc, pointers are 16-byte aligned even though 32-bit for SIMD access.
39
+#if defined(__LP64) || defined(_WIN64) || defined(__wasi__)
40
41
#else
42
static constexpr size_t MALLOC_ALIGN_MASK = 7;
0 commit comments