- elements = GetMaximumProcessorGroupCount();
- GROUP_AFFINITY *affinity = (GROUP_AFFINITY*)malloc(
- elements * sizeof(GROUP_AFFINITY));
- if (fun4(node, affinity, elements, &returnedElements))
- fun3(GetCurrentThread(), &affinity[idx % returnedElements], nullptr);
+ elements = fun5(); // GetMaximumProcessorGroupCount
+ GROUP_AFFINITY *affinity = (GROUP_AFFINITY*)malloc(elements * sizeof(GROUP_AFFINITY));
+ if (fun4(node, affinity, elements, &returnedElements)) // GetNumaNodeProcessorMask2
+ fun3(GetCurrentThread(), &affinity[idx % returnedElements], nullptr); // SetThreadGroupAffinity