Merge branch 'main' into henrymercer/disk-telemetry

This commit is contained in:
Henry Mercer 2023-08-07 17:56:50 +01:00
commit 834f08becb
12 changed files with 50 additions and 34 deletions

View file

@ -161,9 +161,9 @@ function getSystemReservedMemoryMegaBytes(
const fixedAmount = 1024 * (platform === "win32" ? 1.5 : 1);
if (isScalingReservedRamEnabled) {
// Reserve an additional 2.5% of the amount of memory above 8 GB, since the amount used by
// the kernel for page tables scales with the size of physical memory.
const scaledAmount = 0.025 * Math.max(totalMemoryMegaBytes - 8 * 1024, 0);
// Reserve an additional 5% of the amount of memory above 8 GB, since the amount used by the
// kernel for page tables scales with the size of physical memory.
const scaledAmount = 0.05 * Math.max(totalMemoryMegaBytes - 8 * 1024, 0);
return fixedAmount + scaledAmount;
} else {
return fixedAmount;