Allocating Memory Aligned To Cache Lines
It would be beneficial to allocate memory aligned to cache lines. If an array is partitioned for more than one thread to operate on, having the sub-array boundaries unaligned to cache lines could lead to performance degradation. Here is an example to allocate memory (double array of size 10) aligned to cache of 64 bytes.
#includeRead more about this topic: Data Structure Alignment
Famous quotes containing the words memory and/or lines:
“With a tongue like a razor he will kiss,
the mother, the child,
and we three will color the stars black
in memory of his mother
who kept him chained to the food tree
or turned him on and off like a water faucet....”
—Anne Sexton (19281974)
“His more memorable passages are as naturally bright as gleams of sunshine in misty weather. Nature furnishes him not only with words, but with stereotyped lines and sentences from her mint.”
—Henry David Thoreau (18171862)