Skip to content

Commit eb5adba

Browse files
committed
Even more details
1 parent 6ec4981 commit eb5adba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/vanilla/java/affinity/impl/VanillaCpuLayout.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ public class VanillaCpuLayout implements CpuLayout {
4040
threads = new TreeSet<Integer>();
4141
for (CpuInfo cpuDetail : cpuDetails) {
4242
sockets.add(cpuDetail.socketId);
43-
cores.add(cpuDetail.coreId);
43+
cores.add((cpuDetail.socketId << 16) + cpuDetail.coreId);
4444
threads.add(cpuDetail.threadId);
4545
}
4646
this.sockets = sockets.size();
47-
this.coresPerSocket = cores.size();
47+
this.coresPerSocket = cores.size() / sockets.size();
4848
this.threadsPerCore = threads.size();
4949
if (cpuDetails.size() != sockets() * coresPerSocket() * threadsPerCore()) {
5050
StringBuilder error = new StringBuilder();

0 commit comments

Comments
 (0)