cache tries to determine the characteristics of the memory hierarchy. It attempts to determine the
number of caches, the size of each cache, the line size for each cache, and the available memory
parallelism at each level in the memory hierarchy. The largest amount of memory it will examine is len
bytes.
cache first attempts to determine the number and size of caches by measuring the memory latency for
various memory sizes. Once it has identified the various caches it then measures the latency,
parallelism, and line size for each cache. Unfortunately, determining the cache size merely from latency
is exceedingly difficult due to variations in cache replacement and prefetching strategies.