mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Fix GetProcessGroupAffinity call
`GetProcessGroupAffinity` appears to require 4 byte alignment for `GroupArray` memory. See https://stackoverflow.com/q/78567676 for further information closes https://github.com/official-stockfish/Stockfish/pull/5340 No functional change
This commit is contained in:
parent
8aaae0367c
commit
a2a7edf4c8
1 changed files with 2 additions and 2 deletions
|
@ -774,7 +774,7 @@ class NumaConfig {
|
||||||
|
|
||||||
// We are expecting a single group.
|
// We are expecting a single group.
|
||||||
USHORT GroupCount = 1;
|
USHORT GroupCount = 1;
|
||||||
USHORT GroupArray[1];
|
alignas(4) USHORT GroupArray[1];
|
||||||
status = GetProcessGroupAffinity_f(GetCurrentProcess(), &GroupCount, GroupArray);
|
status = GetProcessGroupAffinity_f(GetCurrentProcess(), &GroupCount, GroupArray);
|
||||||
if (status == 0 || GroupCount != 1)
|
if (status == 0 || GroupCount != 1)
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
Loading…
Add table
Reference in a new issue