
366 CHAPTER 5 Shared Memory Multiprocessors
array started at an offset of 32 bytes from a page in the virtual address space, as
this would mean that the data for each particle would now span two cache
blocks, causing false sharing despite the padding. Even if a ma Hoc call does
not return data aligned to pages or blocks, alignment is easy to achieve by sim-
ply allocating a little extra memory through ma Hoc and then suitably adjust-
ing the starting address of the array
As seen in the preceding list of techniques, the organization, alignment, and pad-
ding of data structures are all important for exploiting spatial locality and reducing
fals