Lines Matching refs:that

6 unaligned accesses, why you need to write code that doesn't cause them,
14 from an address that is not evenly divisible by N (i.e. addr % N != 0).
39 writing code that satisfies natural alignment requirements is the easiest way
59 silently perform a different memory access to the one that was requested,
60 resulting in a subtle code bug that is hard to detect!
62 It should be obvious from the above that if your code causes unaligned
67 Code that does not cause unaligned access
75 ensures that things will work for you. For example, take the following
84 Let us assume that an instance of the above structure resides in memory
86 not be unreasonable to expect that accessing field2 would cause an unaligned
88 structure, i.e. address 0x10002, but that address is not evenly divisible
94 to pad structures so that accesses to fields are suitably aligned (assuming
101 At this point, it should be clear that accessing a single byte (u8 or char)
106 that you could reorder the fields in the structure in order to place fields
124 to represent some data that comes in a fixed arrangement 'off the wire'.
126 You might be inclined to believe that usage of this attribute can easily
127 lead to unaligned accesses when accessing fields that do not satisfy
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
174 Here is another example of some code that could cause unaligned accesses:
183 to an address that is not evenly divisible by 4.
197 Going back to an earlier example of code that potentially causes unaligned
223 in the examples above). Be aware that when compared to standard access of
235 On architectures that require aligned loads, networking requires that the IP
244 For some ethernet hardware that cannot DMA to unaligned addresses like
247 unnecessary on architectures that can do unaligned accesses, the code can be