The OpenD Programming Language

CacheInfo

Cache size and behaviour

@trusted nothrow @nogc
struct CacheInfo {}

Members

Variables

associativity
ubyte associativity;

Number of ways of associativity, eg:

  • 1 = direct mapped
  • 2 = 2-way set associative
  • 3 = 3-way set associative
  • ubyte.max = fully associative
lineSize
uint lineSize;

Number of bytes read into the cache when a cache miss occurs.

size
size_t size;

Size of the cache, in kilobytes, per CPU. For L1 unified (data + code) caches, this size is half the physical size. (we don't halve it for larger sizes, since normally data size is much greater than code size for critical loops).

Meta