Report a bug
If you spot a problem with this page, click here to create a Github issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

cpuid.common

Auxiliary data types and functions.

This module is is compatible with betterC compilation mode.
Authors:
Ilya Yaroshenko
struct Cache;
Cache Information
uint size;
Cache size in KBs
ushort associative;
Ways of associativity. Equals associative.max if cache is fully associative.
ushort line;
Cache line in KBs
ubyte cores;
CPU cores per cache
bool inclusive;
true if cache is inclusive of lower cache levels.
bool isFullyAssociative()();

Codeassociative == associative.max

struct Tlb;
Translation Lookaside Buffer Information
uint page;
Page size in KBs
uint entries;
Amount of pages TLB
ushort associative;
Ways of associativity. Equals associative.max if TLB is fully associative.
uint size()();
Computes size in KBs.

Codeentries * page

bool isFullyAssociative()();

Codeassociative == associative.max