Skip to main content

l3_cache_size

Function l3_cache_size 

Source
pub fn l3_cache_size() -> Option<usize>
Expand description

Returns the total size in bytes of the unified L3 cache.

The only possibilities for this returning None are if the system does not support cache parameters, in which case get_cache_parameters() will fail, or if the system has no unified L3 cache.

This is computed as associativity * line_size * sets, and if there are multiple caches available, it returns the size of the smallest cache.