-
Fix allocation of low-alignment memory · becb44f1Nicolas Capens authored
posix_memalign() returns EINVAL if the alignment argument is not a multiple of sizeof(void*). Use regular malloc() for those cases. malloc() is specified to allocate memory which is "suitably aligned for any built-in type". Bug b/128618202 Change-Id: Ibee07be89f2a5bd6be770c35710b20b0c752dfd1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27228 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
becb44f1
×