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 bytes
ubyte cores;
CPU cores per cache
bool inclusive;
true if cache is inclusive of lower cache levels.
bool isFullyAssociative()();

Code associative == 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.

Code entries * page

bool isFullyAssociative()();

Code associative == associative.max