Skip to content

Commit 90bffb2

Browse files
committed
Revert "mimalloc: allow running in Windows Nano Server containers (git-for-windows#4074)"
This reverts commit 5d506d9, reversing changes made to be88dd9.
1 parent 42eff26 commit 90bffb2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

compat/mimalloc/os.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,9 @@ typedef struct MI_PROCESSOR_NUMBER_S { WORD Group; BYTE Number; BYTE Reserved; }
166166
typedef VOID (__stdcall *PGetCurrentProcessorNumberEx)(MI_PROCESSOR_NUMBER* ProcNumber);
167167
typedef BOOL (__stdcall *PGetNumaProcessorNodeEx)(MI_PROCESSOR_NUMBER* Processor, PUSHORT NodeNumber);
168168
typedef BOOL (__stdcall* PGetNumaNodeProcessorMaskEx)(USHORT Node, PGROUP_AFFINITY ProcessorMask);
169-
typedef BOOL (__stdcall *PGetNumaProcessorNode)(UCHAR Processor, PUCHAR NodeNumber);
170169
static PGetCurrentProcessorNumberEx pGetCurrentProcessorNumberEx = NULL;
171170
static PGetNumaProcessorNodeEx pGetNumaProcessorNodeEx = NULL;
172171
static PGetNumaNodeProcessorMaskEx pGetNumaNodeProcessorMaskEx = NULL;
173-
static PGetNumaProcessorNode pGetNumaProcessorNode = NULL;
174172

175173
static bool mi_win_enable_large_os_pages(void)
176174
{
@@ -236,7 +234,6 @@ void _mi_os_init(void)
236234
pGetCurrentProcessorNumberEx = (PGetCurrentProcessorNumberEx)(void (*)(void))GetProcAddress(hDll, "GetCurrentProcessorNumberEx");
237235
pGetNumaProcessorNodeEx = (PGetNumaProcessorNodeEx)(void (*)(void))GetProcAddress(hDll, "GetNumaProcessorNodeEx");
238236
pGetNumaNodeProcessorMaskEx = (PGetNumaNodeProcessorMaskEx)(void (*)(void))GetProcAddress(hDll, "GetNumaNodeProcessorMaskEx");
239-
pGetNumaProcessorNode = (PGetNumaProcessorNode)(void (*)(void))GetProcAddress(hDll, "GetNumaProcessorNode");
240237
FreeLibrary(hDll);
241238
}
242239
if (mi_option_is_enabled(mi_option_large_os_pages) || mi_option_is_enabled(mi_option_reserve_huge_os_pages)) {
@@ -1319,11 +1316,11 @@ static size_t mi_os_numa_nodex(void) {
13191316
BOOL ok = (*pGetNumaProcessorNodeEx)(&pnum, &nnode);
13201317
if (ok) numa_node = nnode;
13211318
}
1322-
else if (pGetNumaProcessorNode != NULL) {
1319+
else {
13231320
// Vista or earlier, use older API that is limited to 64 processors. Issue #277
13241321
DWORD pnum = GetCurrentProcessorNumber();
13251322
UCHAR nnode = 0;
1326-
BOOL ok = pGetNumaProcessorNode((UCHAR)pnum, &nnode);
1323+
BOOL ok = GetNumaProcessorNode((UCHAR)pnum, &nnode);
13271324
if (ok) numa_node = nnode;
13281325
}
13291326
return numa_node;

0 commit comments

Comments
 (0)