Lines Matching full:access
8 when it comes to memory access. This document presents some details about
13 The definition of an unaligned access
20 access.
22 The above may seem a little vague, as memory access can happen in different
26 which will compile to multiple-byte memory access instructions, namely when
41 of memory access. However, we must consider ALL supported architectures;
46 Why unaligned access is bad
49 The effects of performing an unaligned memory access vary from architecture
56 happen. The exception handler is able to correct the unaligned access,
60 unaligned access to be corrected.
61 - Some architectures are not capable of unaligned memory access, but will
62 silently perform a different memory access to the one that was requested,
70 Code that does not cause unaligned access
90 access. You'd be expecting field2 to be located at offset 2 bytes into the
105 will never cause an unaligned access, because all memory addresses are evenly
133 the memory access in a way that does not cause unaligned access. Of course,
139 Code that causes unaligned access
143 that can cause an unaligned memory access. The following function taken
161 In the above function, when the hardware has efficient unaligned access
163 able to access memory on arbitrary boundaries, the reference to a[0] causes
167 (Hint: it'd be an unaligned access.)
169 Despite the potential unaligned access problems with the above function, it
188 In summary, the 2 main scenarios where you may run into unaligned access
191 2. Pointer arithmetic followed by access to at least 2 bytes of data
197 The easiest way to avoid unaligned access is to use the get_unaligned() and
201 access:
210 To avoid the unaligned memory access, you would rewrite it as follows:
221 memory and you wish to avoid unaligned access, its usage is as follows:
226 in the examples above). Be aware that when compared to standard access of
227 aligned memory, using these macros to access unaligned memory can be costly in