mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-06 23:52:38 -05:00
Compare commits
4 Commits
a6bb5bcf8b
...
3b57c88cfc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b57c88cfc | ||
|
|
36fdfa2694 | ||
|
|
6cfc02d24f | ||
|
|
5ac6d438fa |
@@ -320,11 +320,16 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
|
||||
L2 += l2->attr->cache.size;
|
||||
L2_associativity = l2->attr->cache.associativity;
|
||||
|
||||
if (L3_exclusive && l2->attr->cache.size >= scratchpad) {
|
||||
if (L3_exclusive) {
|
||||
if (vendor() == VENDOR_AMD) {
|
||||
extra += std::min<size_t>(l2->attr->cache.size, scratchpad);
|
||||
}
|
||||
else if (l2->attr->cache.size >= scratchpad) {
|
||||
extra += scratchpad;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This code is supposed to run only on Intel CPUs
|
||||
if ((vendor() == VENDOR_INTEL) && (scratchpad == 2 * oneMiB)) {
|
||||
|
||||
@@ -169,6 +169,12 @@ bool xmrig::Platform::isOnBatteryPower()
|
||||
return (status == "Discharging");
|
||||
}
|
||||
}
|
||||
std::ifstream f("/sys/class/power_supply/macsmc-battery/status");
|
||||
if (f.is_open()) {
|
||||
std::string status;
|
||||
f >> status;
|
||||
return (status == "Discharging");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user