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
Contributor

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.

> 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.
lda added 1 commit 2024-10-24 10:58:42 +00:00
[FIX] Fix memory alignment issues
All checks were successful
Compile Cytoplasm / Compile Cytoplasm (aarch64, alpine) (pull_request) Successful in 13s
708c5daad9
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.
jordan merged commit 8df5f0f1c1 into master 2024-10-24 11:57:51 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Telodendria/Cytoplasm#59
No description provided.