__unaligned
Microsoft-specific. When you declare a pointer with the __unaligned
modifier, the compiler assumes that the pointer addresses data that isn't aligned. So, platform-appropriate code is generated to handle unaligned reads and writes through the pointer.
Remarks
This modifier describes the alignment of the data addressed by the pointer. It is assumed that the pointer itself is aligned.
The necessity for the __unaligned
keyword varies by platform and environment. Failure to mark data appropriately can result in issues ranging from performance penalties to hardware faults. The __unaligned
modifier isn't valid for the x86 platform.
For compatibility with previous versions, _unaligned
is a synonym for __unaligned
unless compiler option /Za
(Disable language extensions) is specified.
For more information about alignment, see:
See also
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho