Currently testing_roc_allocin crates/compiler/builtins/bitcode/src/utils.zig ignores the value passed as alignment and always returns a pointer to memory with alignment 1. This caused me a few hours of confusion trying to test an allocation that needed aligning.
Ideally, it would align to whatever value is passed (up to that supported by Zig), but allocating with an alignment not known at compile time seems hard (?).
Always aligning to 16 and panicking if a higher alignment is requested seems like it would cover all likely cases (without wasting too many bytes)
Currently
testing_roc_alloc
in crates/compiler/builtins/bitcode/src/utils.zig ignores the value passed as alignment and always returns a pointer to memory with alignment 1. This caused me a few hours of confusion trying to test an allocation that needed aligning. Ideally, it would align to whatever value is passed (up to that supported by Zig), but allocating with an alignment not known at compile time seems hard (?). Always aligning to 16 and panicking if a higher alignment is requested seems like it would cover all likely cases (without wasting too many bytes)