mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 03:59:41 +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 {
|
||||
|
||||
|
||||
#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
|
||||
static const char *coloredAsmNames[] = {
|
||||
RED_BOLD("none"),
|
||||
|
@ -66,17 +73,13 @@ inline static const char *asmName(Assembly::Id assembly)
|
|||
|
||||
static void print_memory(Config *config)
|
||||
{
|
||||
# ifdef XMRIG_OS_WIN
|
||||
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"));
|
||||
# else
|
||||
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s", "HUGE PAGES", config->cpu().isHugePages() ? GREEN_BOLD("supported") : RED_BOLD("disabled"));
|
||||
# endif
|
||||
"HUGE PAGES", config->cpu().isHugePages() ? (VirtualMemory::isHugepagesAvailable() ? kHugepagesSupported : RED_BOLD("unavailable")) : RED_BOLD("disabled"));
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
# ifdef XMRIG_OS_LINUX
|
||||
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
|
||||
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s", "1GB PAGES", YELLOW_BOLD("unavailable"));
|
||||
# endif
|
||||
|
|
|
@ -59,7 +59,11 @@
|
|||
|
||||
bool xmrig::VirtualMemory::isHugepagesAvailable()
|
||||
{
|
||||
# if defined(XMRIG_OS_MACOS) && defined(XMRIG_ARM)
|
||||
return false;
|
||||
# else
|
||||
return true;
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue