2 parents 0f200fb + 57edefe commit 35a6fccCopy full SHA for 35a6fcc
1 file changed
Sources/FluidAudio/Shared/ANEMemoryUtils.swift
@@ -1,5 +1,6 @@
1
import Accelerate
2
import CoreML
3
+import Darwin
4
import Foundation
5
import Metal
6
@@ -66,7 +67,8 @@ public enum ANEMemoryUtils {
66
67
dataType: dataType,
68
strides: strides,
69
deallocator: { bytes in
- bytes.deallocate()
70
+ // `posix_memalign` requires `free` for cleanup; `deallocate()` would trap.
71
+ Darwin.free(bytes)
72
}
73
)
74
0 commit comments