mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 12:09:22 +00:00
Huge pages not supported by macOS ARM.
This commit is contained in:
parent
a934ba3079
commit
6b21a51a2f
2 changed files with 13 additions and 6 deletions
|
@ -47,6 +47,13 @@
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef XMRIG_OS_WIN
|
||||||
|
static constexpr const char *kHugepagesSupported = GREEN_BOLD("permission granted");
|
||||||
|
#else
|
||||||
|
static constexpr const char *kHugepagesSupported = GREEN_BOLD("supported");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef XMRIG_FEATURE_ASM
|
#ifdef XMRIG_FEATURE_ASM
|
||||||
static const char *coloredAsmNames[] = {
|
static const char *coloredAsmNames[] = {
|
||||||
RED_BOLD("none"),
|
RED_BOLD("none"),
|
||||||
|
@ -66,17 +73,13 @@ inline static const char *asmName(Assembly::Id assembly)
|
||||||
|
|
||||||
static void print_memory(Config *config)
|
static void print_memory(Config *config)
|
||||||
{
|
{
|
||||||
# ifdef XMRIG_OS_WIN
|
|
||||||
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s",
|
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s",
|
||||||
"HUGE PAGES", config->cpu().isHugePages() ? (VirtualMemory::isHugepagesAvailable() ? GREEN_BOLD("permission granted") : RED_BOLD("unavailable")) : RED_BOLD("disabled"));
|
"HUGE PAGES", config->cpu().isHugePages() ? (VirtualMemory::isHugepagesAvailable() ? kHugepagesSupported : RED_BOLD("unavailable")) : RED_BOLD("disabled"));
|
||||||
# else
|
|
||||||
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s", "HUGE PAGES", config->cpu().isHugePages() ? GREEN_BOLD("supported") : RED_BOLD("disabled"));
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_RANDOMX
|
# ifdef XMRIG_ALGO_RANDOMX
|
||||||
# ifdef XMRIG_OS_LINUX
|
# ifdef XMRIG_OS_LINUX
|
||||||
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s",
|
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s",
|
||||||
"1GB PAGES", (VirtualMemory::isOneGbPagesAvailable() ? (config->rx().isOneGbPages() ? GREEN_BOLD("supported") : YELLOW_BOLD("disabled")) : YELLOW_BOLD("unavailable")));
|
"1GB PAGES", (VirtualMemory::isOneGbPagesAvailable() ? (config->rx().isOneGbPages() ? kHugepagesSupported : YELLOW_BOLD("disabled")) : YELLOW_BOLD("unavailable")));
|
||||||
# else
|
# else
|
||||||
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s", "1GB PAGES", YELLOW_BOLD("unavailable"));
|
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s", "1GB PAGES", YELLOW_BOLD("unavailable"));
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -59,7 +59,11 @@
|
||||||
|
|
||||||
bool xmrig::VirtualMemory::isHugepagesAvailable()
|
bool xmrig::VirtualMemory::isHugepagesAvailable()
|
||||||
{
|
{
|
||||||
|
# if defined(XMRIG_OS_MACOS) && defined(XMRIG_ARM)
|
||||||
|
return false;
|
||||||
|
# else
|
||||||
return true;
|
return true;
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue