I am working on Embedded Swift and started to get linking errors with "undefined reference to `posix_memalign'". Seems like I have to create that function myself. Or just use -no-allocations. However in doing so I am not sure how to use I create an array with no allocation?
let BUF_SIZE = 2048
var staticBufferSent = [UInt8](repeating: 0, count: BUF_SIZE)
in function specialized static Array._allocateBufferUninitialized(minimumCapacity:)
:0: error: cannot use allocating type '_ContiguousArrayStorage' in -no-allocations mode
in function specialized _ContiguousArrayBuffer._consumeAndCreateNew(bufferIsUnique:minimumCapacity:growForAppend:)
error: cannot use allocating type '_ContiguousArrayStorage' in -no-allocations mode
32 | var staticBufferSent = [UInt8](repeating: 0, count: BUF_SIZE)
| `- error: cannot use allocating type '_ContiguousArrayStorage' in -no-allocations mode