How can I programmatically measure (not query the OS) the size and order of associativity of L1 and L2 caches (data caches)?
Assumptions about system:
There is a program on
Figure 5.32 on page 352 in Computer Architecture: A Quantitative Approach, 4th Edition. This was used at my university for a lab together with question 5.18 in the same book.