13 releases

0.7.0 Jun 24, 2024
0.6.0 Mar 14, 2022
0.5.1 May 1, 2020
0.5.0 Feb 18, 2020
0.2.1 Aug 13, 2018

#96 in Memory management

Download history 585/week @ 2024-07-26 633/week @ 2024-08-02 539/week @ 2024-08-09 535/week @ 2024-08-16 333/week @ 2024-08-23 455/week @ 2024-08-30 353/week @ 2024-09-06 413/week @ 2024-09-13 404/week @ 2024-09-20 532/week @ 2024-09-27 241/week @ 2024-10-04 301/week @ 2024-10-11 413/week @ 2024-10-18 457/week @ 2024-10-25 540/week @ 2024-11-01 326/week @ 2024-11-08

1,808 downloads per month
Used in 2 crates

BSD-3-Clause

17KB
200 lines

cache-size

License Crates.io Documentation Continuous Integration

A library to quickly get the size and line size of your CPU caches.

Currently this crate only supports x86 CPUs, since it relies on the CPUID instruction, via the raw_cpuid crate. It is a goal to support other architectures; PRs are welcome!

Note that the library will still compile and work on non x86 architectures, but the result of all the cache queries will be None.


Check the Intel 64 and IA-32 Architectures Software Developers Manual for more information on the CPUID instruction.

Dependencies

~615KB
~11K SLoC