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:
“But the iniquity of oblivion blindly scattereth her poppy, and deals with the memory of men without distinction to merit of perpetuity.”
—Thomas Browne (16051682)
“There is something to be said for government by a great aristocracy which has furnished leaders to the nation in peace and war for generations; even a Democrat like myself must admit this. But there is absolutely nothing to be said for government by a plutocracy, for government by men very powerful in certain lines and gifted with the money touch, but with ideals which in their essence are merely those of so many glorified pawnbrokers.”
—Theodore Roosevelt (18581919)