From b967cba9aea0da7276eae9f70f81fba3c20591e8 Mon Sep 17 00:00:00 2001 From: helloguo Date: Tue, 11 Jul 2017 03:28:56 -0700 Subject: [PATCH] fix NUMASupportInitialize --- src/pal/src/numa/numa.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/pal/src/numa/numa.cpp b/src/pal/src/numa/numa.cpp index 046f847..e3b97a9 100644 --- a/src/pal/src/numa/numa.cpp +++ b/src/pal/src/numa/numa.cpp @@ -25,11 +25,6 @@ SET_DEFAULT_DEBUG_CHANNEL(NUMA); #include "pal/corunix.hpp" #include "pal/thread.hpp" -#if HAVE_NUMA_H -#include -#include -#endif - #if HAVE_PTHREAD_NP_H #include #endif @@ -161,7 +156,7 @@ NUMASupportInitialize() FOR_ALL_NUMA_FUNCTIONS #undef PER_FUNCTION_BLOCK - if (numa_available() != -1) + if (numa_available() == -1) { dlclose(numaHandle); } @@ -234,8 +229,8 @@ FOR_ALL_NUMA_FUNCTIONS g_highestNumaNode = numa_max_node(); } } - else #endif // HAVE_NUMA_H + if (!g_numaAvailable) { // No NUMA g_possibleCpuCount = PAL_GetLogicalCpuCountFromOS(); -- 2.7.4