Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Objects/mimalloc/prim/windows/prim.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ terms of the MIT license. A copy of the license can be found in the file
#include "mimalloc/atomic.h"
#include "mimalloc/prim.h"
#include <stdio.h> // fputs, stderr
#include <bcrypt.h> // NTSTATUS


//---------------------------------------------
Expand Down Expand Up @@ -377,6 +378,7 @@ size_t _mi_prim_numa_node(void) {
}

size_t _mi_prim_numa_node_count(void) {
#ifdef MS_WINDOWS_DESKTOP
ULONG numa_max = 0;
GetNumaHighestNodeNumber(&numa_max);
// find the highest node number that has actual processors assigned to it. Issue #282
Expand All @@ -399,6 +401,9 @@ size_t _mi_prim_numa_node_count(void) {
numa_max--;
}
return ((size_t)numa_max + 1);
#else
return ((size_t)1);
#endif
}


Expand Down
Loading