Код: Выделить всё
#include
#include
#include
#include
int main() {
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
pid_t pid = getpid();
if (sched_getaffinity(pid, sizeof(cpu_set_t), &cpuset) == -1) {
perror("sched_getaffinity");
return 1;
}
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79255509/sched-getaffinity-shows-isolated-cpus[/url]
Мобильная версия