int cpuCount = getCPUCount();
Core *cpu = allocate_core(cpucount);
とかやれば・・・

って、書いてて思ったけど、
これ OS の APIじゃね?