[Oracle] Add low-memory check (<=4GiB) and use mtgxml url instead.

This commit is contained in:
Brübach, Lukas 2025-12-03 10:37:50 +01:00 • committed by Lukas Brübach
parent a712553c81
commit e46ac131a3
4 changed files with 147 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#ifndef COCKATRICE_SYSTEM_MEMORY_QUERIER_H
#define COCKATRICE_SYSTEM_MEMORY_QUERIER_H
#include <QtGlobal>
class SystemMemoryQuerier
{
public:
static qulonglong totalMemoryBytes();
static qulonglong availableMemoryBytes();
static bool hasAtLeastGiB(int gib)
{
const qulonglong GiB = 1024ull * 1024ull * 1024ull;
return totalMemoryBytes() >= (qulonglong)gib * GiB;
}
};
#endif // COCKATRICE_SYSTEM_MEMORY_QUERIER_H