Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 545 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 545 Bytes

free-cpus

Get the set of free CPU cores on your Linux machine.

The logic is heavily inspired by AFL++'s code.

Usage

Add to Cargo.toml:

[dependencies]
free-cpus = "2.0.0"

In your rust code:

// Get the set of free CPU cores on this Linux machine
let cpus: HashMap<usize> = free_cpus::get().unwrap();