NativeMemory.AlignedAlloc() page boundary alignment #111784
-
Hi, I'd like to double check whether NativeMemory.AlignedAlloc() with |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The guarantee is provided by underlying system call, for example However, when working with other system calls, consider to be explicit about the syscall usages, to ensure any other implications are met. |
Beta Was this translation helpful? Give feedback.
-
AFAIR |
Beta Was this translation helpful? Give feedback.
AFAIR
malloc
and the family can return memory which is a part of a large page, there this assumption would AFAIR not be valid since your data would just be a part of it.Additionally, relying on this will be problematic too even without large pages when it comes to freeing as you'd need to restore the original memory state before doing so.