Valhalla Legends Archive

General => General Discussion => Topic started by: Arta on January 25, 2004, 10:18 AM

Title: Finding cache size
Post by: Arta on January 25, 2004, 10:18 AM
Does anyone know of a way (functional under >=win2k)  to find the size of the processor's L2 cache?
Title: Re:Finding cache size
Post by: Skywing on January 25, 2004, 10:39 AM
You can use cpuid with level=2 to get it from P4s...
Title: Re:Finding cache size
Post by: Arta on January 26, 2004, 10:02 AM
Quote from: Skywing on January 25, 2004, 10:39 AM
You can use cpuid with level=2 to get it from P4s...

Would rather use a non-cpuspecific way if there is one.
Title: Re:Finding cache size
Post by: Adron on January 26, 2004, 10:53 AM
You could make a loop doing an operation on a dataset of a certain size. Increase size step by step and measure performance. When performance drops more than linearly, you've hit the cache size.