How do I find the cache block size in Ubuntu, programmatically (with C++) or otherwise?
You can find it in /proc/cpuinfo; cache size for the total size, and cache_alignment for the block size.
/proc/cpuinfo
cache size
cache_alignment