Skip to content

Commit 8b2433a

Browse files
authored
gh-152433: Allow building mimalloc for Windows UWP (GH-152477)
1 parent 1f25c33 commit 8b2433a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • Objects/mimalloc/prim/windows

Objects/mimalloc/prim/windows/prim.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ terms of the MIT license. A copy of the license can be found in the file
1212
#include "mimalloc/atomic.h"
1313
#include "mimalloc/prim.h"
1414
#include <stdio.h> // fputs, stderr
15+
#include <bcrypt.h> // NTSTATUS
1516

1617

1718
//---------------------------------------------
@@ -377,6 +378,7 @@ size_t _mi_prim_numa_node(void) {
377378
}
378379

379380
size_t _mi_prim_numa_node_count(void) {
381+
#ifdef MS_WINDOWS_DESKTOP
380382
ULONG numa_max = 0;
381383
GetNumaHighestNodeNumber(&numa_max);
382384
// find the highest node number that has actual processors assigned to it. Issue #282
@@ -399,6 +401,9 @@ size_t _mi_prim_numa_node_count(void) {
399401
numa_max--;
400402
}
401403
return ((size_t)numa_max + 1);
404+
#else
405+
return ((size_t)1);
406+
#endif
402407
}
403408

404409

0 commit comments

Comments
 (0)