Lines Matching refs:access
5 when it comes to memory access. This document presents some details about
10 The definition of an unaligned access
17 access.
19 The above may seem a little vague, as memory access can happen in different
23 which will compile to multiple-byte memory access instructions, namely when
38 of memory access. However, we must consider ALL supported architectures;
43 Why unaligned access is bad
46 The effects of performing an unaligned memory access vary from architecture
53 happen. The exception handler is able to correct the unaligned access,
57 unaligned access to be corrected.
58 - Some architectures are not capable of unaligned memory access, but will
59 silently perform a different memory access to the one that was requested,
67 Code that does not cause unaligned access
87 access. You'd be expecting field2 to be located at offset 2 bytes into the
102 will never cause an unaligned access, because all memory addresses are evenly
130 the memory access in a way that does not cause unaligned access. Of course,
136 Code that causes unaligned access
140 that can cause an unaligned memory access. The following function taken
158 In the above function, when the hardware has efficient unaligned access
160 able to access memory on arbitrary boundaries, the reference to a[0] causes
164 (Hint: it'd be an unaligned access.)
166 Despite the potential unaligned access problems with the above function, it
185 In summary, the 2 main scenarios where you may run into unaligned access
188 2. Pointer arithmetic followed by access to at least 2 bytes of data
194 The easiest way to avoid unaligned access is to use the get_unaligned() and
198 access:
207 To avoid the unaligned memory access, you would rewrite it as follows:
218 memory and you wish to avoid unaligned access, its usage is as follows:
223 in the examples above). Be aware that when compared to standard access of
224 aligned memory, using these macros to access unaligned memory can be costly in