After reading this I wondered how nproc was implemented. It seems to be getting a cpu affinity mask for the process and passing that through popcnt to get the processor count.
After reading this I wondered how nproc was implemented. It seems to be getting a cpu affinity mask for the process and passing that through popcnt to get the processor count.