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:
“Beauclerc: Youve got a good memory for one who drinks.
Eddie: Drinkin dont bother my memory. If it did, I wouldnt drink. I couldnt. You see, Id forget how good it was. Then whered I be? Id start drinkin water again.”
—Jules Furthman (18881960)
“Scholars and artists thrown together are often annoyed at the puzzle of where they differ. Both work from knowledge; but I suspect they differ most importantly in the way their knowledge is come by. Scholars get theirs with conscientious thoroughness along projected lines of logic; poets theirs cavalierly and as it happens in and out of books. They stick to nothing deliberately, but let what will stick to them like burrs where they walk in the fields.”
—Robert Frost (18741963)