Fix scaling reserved RAM feature flag naming

This commit is contained in:
Henry Mercer 2023-07-18 13:12:12 +01:00
parent da4e0a06c0
commit 27d3b2f857
12 changed files with 36 additions and 12 deletions

2
lib/util.js generated
View file

@ -111,7 +111,7 @@ exports.withTmpDir = withTmpDir;
async function getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, features) {
// Windows needs more memory for OS processes.
const fixedAmount = 1024 * (process.platform === "win32" ? 1.5 : 1);
if (await features.getValue(feature_flags_1.Feature.ScalingReservedRam)) {
if (await features.getValue(feature_flags_1.Feature.ScalingReservedRamEnabled)) {
// Reserve an additional 2% of the total memory, since the amount used by
// the kernel for page tables scales with the size of physical memory.
const scaledAmount = 0.02 * totalMemoryMegaBytes;