Make Memory API more friendly with alignment #59

Merged
jordan merged 1 commit from lda/Cytoplasm:alignment into master 2024-10-24 11:57:51 +00:00

1 commit

Author SHA1 Message Date
LDA
708c5daad9 [FIX] Fix memory alignment issues
All checks were successful
Compile Cytoplasm / Compile Cytoplasm (aarch64, alpine) (pull_request) Successful in 13s
Some architectures(DEC Alpha as a main outlier, but x86 may behave that
way by setting flags) raise traps on unaligned operations, which can be
either costly(having to talk to the kernel, which may have to emulate
the read) or could cause program termination.

Also adds a basic memory interval for checking if a pointer has any
business living within the heap. Most systems separate those anyways so
it avoids doing potentially dangerous operations.
2024-10-24 11:41:33 +02:00