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:
“Canst thou not minister to a mind diseased,
Pluck from the memory a rooted sorrow,
Raze out the written troubles of the brain,
And with some sweet oblivious antidote
Cleanse the fraught bosom of that perilous stuff
Which weighs upon the heart?”
—William Shakespeare (15641616)
“To understand
The signs that stars compose, we need depend
Only on stars that are entirely there
And the apparent space between them. There
Never need be lines between them, puzzling
Our sense of what is what.”
—John Hollander (b. 1929)