diff --git a/core/base/memory/MemoryPool.hpp b/core/base/memory/MemoryPool.hpp index 38cbf1df..c5c5aba4 100644 --- a/core/base/memory/MemoryPool.hpp +++ b/core/base/memory/MemoryPool.hpp @@ -171,7 +171,7 @@ public: class ThreadDistributedMemoryPool { private: - v_word32 m_shardsCount; + v_int32 m_shardsCount; MemoryPool** m_shards; public: ThreadDistributedMemoryPool(const std::string& name, v_int32 entrySize, v_int32 chunkSize, diff --git a/core/concurrency/Thread.cpp b/core/concurrency/Thread.cpp index 21babe6a..f0c4d54a 100644 --- a/core/concurrency/Thread.cpp +++ b/core/concurrency/Thread.cpp @@ -48,7 +48,7 @@ v_int32 Thread::assignThreadToCpuRange(std::thread::native_handle_type nativeHan CPU_ZERO(&cpuset); for(v_int32 i = fromCpu; i <= toCpu; i++) { - CPU_SET(cpuIndex, &cpuset); + CPU_SET(i, &cpuset); } v_int32 result = pthread_setaffinity_np(nativeHandle, sizeof(cpu_set_t), &cpuset);