Merge branch 'dev'

This commit is contained in:
XMRig 2021-10-05 23:28:06 +07:00
commit 68741c925b
No known key found for this signature in database
GPG key ID: 446A53638BE94409
5 changed files with 16 additions and 38 deletions

View file

@ -1,3 +1,7 @@
# v6.15.2
- [#2606](https://github.com/xmrig/xmrig/pull/2606) Fixed: AstroBWT auto-config ignored `max-threads-hint`.
- Fixed possible crash on Windows (regression in v6.15.1).
# v6.15.1
- [#2586](https://github.com/xmrig/xmrig/pull/2586) Fixed Windows 7 compatibility.
- [#2594](https://github.com/xmrig/xmrig/pull/2594) Added Windows taskbar icon colors.

View file

@ -216,12 +216,6 @@ bool xmrig::HwlocCpuInfo::membind(hwloc_const_bitmap_t nodeset)
xmrig::CpuThreads xmrig::HwlocCpuInfo::threads(const Algorithm &algorithm, uint32_t limit) const
{
# ifdef XMRIG_ALGO_ASTROBWT
if (algorithm == Algorithm::ASTROBWT_DERO) {
return allThreads(algorithm, limit);
}
# endif
# ifndef XMRIG_ARM
if (L2() == 0 && L3() == 0) {
return BasicCpuInfo::threads(algorithm, limit);
@ -307,9 +301,16 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
size_t L2 = 0;
int L2_associativity = 0;
size_t extra = 0;
const size_t scratchpad = algorithm.l3();
size_t scratchpad = algorithm.l3();
uint32_t intensity = algorithm.maxIntensity() == 1 ? 0 : 1;
# ifdef XMRIG_ALGO_ASTROBWT
if (algorithm == Algorithm::ASTROBWT_DERO) {
// Use fake low value to force usage of all available cores for AstroBWT (taking 'limit' into account)
scratchpad = 16 * 1024;
}
# endif
if (cache->attr->cache.depth == 3) {
for (size_t i = 0; i < cache->arity; ++i) {
hwloc_obj_t l2 = cache->children[i];

View file

@ -142,38 +142,11 @@ xmrig::String xmrig::Env::get(const String &name, const std::map<String, String>
xmrig::String xmrig::Env::hostname()
{
# ifdef _WIN32
const HMODULE hLib = LoadLibraryA("Ws2_32.dll");
if (hLib) {
typedef int (WSAAPI* GetHostNameW_proc)(PWSTR, int);
GetHostNameW_proc GetHostNameW_ptr = reinterpret_cast<GetHostNameW_proc>(GetProcAddress(hLib, "GetHostNameW"));
if (GetHostNameW_ptr) {
WCHAR buf[UV_MAXHOSTNAMESIZE];
if (GetHostNameW_ptr(buf, UV_MAXHOSTNAMESIZE) != 0) {
return {};
}
char utf8_str[UV_MAXHOSTNAMESIZE * 4 + 1];
const int len = WideCharToMultiByte(CP_UTF8, 0, buf, -1, utf8_str, sizeof(utf8_str), nullptr, nullptr);
if (len <= 0) {
return {};
}
return utf8_str;
}
}
# endif
char buf[UV_MAXHOSTNAMESIZE]{};
size_t size = sizeof(buf);
# if (UV_VERSION_HEX >= 0x010c00) && !defined(_WIN32)
if (uv_os_gethostname(buf, &size) == 0) {
if (gethostname(buf, sizeof(buf)) == 0) {
return static_cast<const char *>(buf);
}
# else
if (gethostname(buf, size) == 0) {
return static_cast<const char *>(buf);
}
# endif
return {};
}

View file

@ -141,7 +141,7 @@ xmrig::Entry::Id xmrig::Entry::get(const Process &process)
return Usage;
}
if (args.hasArg("-V") || args.hasArg("--version")) {
if (args.hasArg("-V") || args.hasArg("--version") || args.hasArg("--versions")) {
return Version;
}

View file

@ -22,7 +22,7 @@
#define APP_ID "xmrig"
#define APP_NAME "XMRig"
#define APP_DESC "XMRig miner"
#define APP_VERSION "6.15.1"
#define APP_VERSION "6.15.2-dev"
#define APP_DOMAIN "xmrig.com"
#define APP_SITE "www.xmrig.com"
#define APP_COPYRIGHT "Copyright (C) 2016-2021 xmrig.com"
@ -30,7 +30,7 @@
#define APP_VER_MAJOR 6
#define APP_VER_MINOR 15
#define APP_VER_PATCH 1
#define APP_VER_PATCH 2
#ifdef _MSC_VER
# if (_MSC_VER >= 1920)