Lines Matching refs:access
14 when it comes to memory access. This document presents some details about
19 The definition of an unaligned access
26 access.
28 The above may seem a little vague, as memory access can happen in different
32 which will compile to multiple-byte memory access instructions, namely when
47 of memory access. However, we must consider ALL supported architectures;
52 Why unaligned access is bad
55 The effects of performing an unaligned memory access vary from architecture
62 happen. The exception handler is able to correct the unaligned access,
66 unaligned access to be corrected.
67 - Some architectures are not capable of unaligned memory access, but will
68 silently perform a different memory access to the one that was requested,
76 Code that does not cause unaligned access
96 access. You'd be expecting field2 to be located at offset 2 bytes into the
111 will never cause an unaligned access, because all memory addresses are evenly
139 the memory access in a way that does not cause unaligned access. Of course,
145 Code that causes unaligned access
149 that can cause an unaligned memory access. The following function taken
167 In the above function, when the hardware has efficient unaligned access
169 able to access memory on arbitrary boundaries, the reference to a[0] causes
173 (Hint: it'd be an unaligned access.)
175 Despite the potential unaligned access problems with the above function, it
195 In summary, the 2 main scenarios where you may run into unaligned access
199 2. Pointer arithmetic followed by access to at least 2 bytes of data
205 The easiest way to avoid unaligned access is to use the get_unaligned() and
209 access::
218 To avoid the unaligned memory access, you would rewrite it as follows::
229 memory and you wish to avoid unaligned access, its usage is as follows::
234 in the examples above). Be aware that when compared to standard access of
235 aligned memory, using these macros to access unaligned memory can be costly in