mirror of
https://github.com/github/codeql-action.git
synced 2026-11-13 00:05:27 +00:00
Compute RAM based on free system RAM rather than total system RAM
This commit is contained in:
2
lib/util.js
generated
2
lib/util.js
generated
@@ -150,7 +150,7 @@ exports.getMemoryFlagValueForPlatform = getMemoryFlagValueForPlatform;
|
||||
* @returns {number} the amount of RAM to use, in megabytes
|
||||
*/
|
||||
function getMemoryFlagValue(userInput, isScalingReservedRamEnabled) {
|
||||
return getMemoryFlagValueForPlatform(userInput, os.totalmem(), process.platform, isScalingReservedRamEnabled);
|
||||
return getMemoryFlagValueForPlatform(userInput, os.freemem(), process.platform, isScalingReservedRamEnabled);
|
||||
}
|
||||
exports.getMemoryFlagValue = getMemoryFlagValue;
|
||||
/**
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -214,7 +214,7 @@ export function getMemoryFlagValue(
|
||||
): number {
|
||||
return getMemoryFlagValueForPlatform(
|
||||
userInput,
|
||||
os.totalmem(),
|
||||
os.freemem(),
|
||||
process.platform,
|
||||
isScalingReservedRamEnabled,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user