@@ -1024,6 +1024,8 @@ bool PCM::discoverSystemTopology()
10241024 return false ;
10251025 }
10261026
1027+ (void ) coreMaskWidth; // to supress warnings on MacOS (unused vars)
1028+
10271029 uint32 l2CacheMaskShift = 0 ;
10281030#ifdef PCM_DEBUG_TOPOLOGY
10291031 uint32 threadsSharingL2;
@@ -1044,13 +1046,15 @@ bool PCM::discoverSystemTopology()
10441046 << " [the most significant bit = " << l2CacheMaskShift << " ]\n " ;
10451047#endif
10461048
1049+ #ifndef __APPLE__
10471050 auto populateEntry = [&smtMaskWidth, &coreMaskWidth, &l2CacheMaskShift](TopologyEntry & entry, const int apic_id)
10481051 {
10491052 entry.thread_id = smtMaskWidth ? extract_bits_ui (apic_id, 0 , smtMaskWidth - 1 ) : 0 ;
10501053 entry.core_id = (smtMaskWidth + coreMaskWidth) ? extract_bits_ui (apic_id, smtMaskWidth, smtMaskWidth + coreMaskWidth - 1 ) : 0 ;
10511054 entry.socket = extract_bits_ui (apic_id, smtMaskWidth + coreMaskWidth, 31 );
10521055 entry.tile_id = extract_bits_ui (apic_id, l2CacheMaskShift, 31 );
10531056 };
1057+ #endif
10541058
10551059 auto populateHybridEntry = [this ](TopologyEntry& entry, int core) -> bool
10561060 {
@@ -7466,7 +7470,7 @@ void ServerPCICFGUncore::cleanupMemTest(const ServerPCICFGUncore::MemTestParam &
74667470 munmap (b, memBufferBlockSize);
74677471#elif defined(_MSC_VER)
74687472 VirtualFree (b, memBufferBlockSize, MEM_RELEASE);
7469- #elif defined(__FreeBSD__)
7473+ #elif defined(__FreeBSD__) || defined(__APPLE__)
74707474 (void ) b; // avoid the unused variable warning
74717475 (void ) memBufferBlockSize; // avoid the unused variable warning
74727476#else
0 commit comments