import type { MachinePresetResources } from "../schemas/common.js"; /** * Returns a value to be used for `--max-old-space-size`. It is in MiB. * Setting this correctly means V8 spends more times running Garbage Collection (GC). * It won't eliminate crashes but it will help avoid them. * @param {MachinePresetResources} machine - The machine preset configuration containing memory specifications * @param {number} [overhead=0.2] - The memory overhead factor (0.2 = 20% reserved for system operations) * @returns {number} The calculated max old space size in MiB */ export declare function maxOldSpaceSizeForMachine(machine: MachinePresetResources, overhead?: number): number; /** * Returns a flag to be used for `--max-old-space-size`. It is in MiB. * Setting this correctly means V8 spends more times running Garbage Collection (GC). * It won't eliminate crashes but it will help avoid them. * @param {MachinePresetResources} machine - The machine preset configuration containing memory specifications * @param {number} [overhead=0.2] - The memory overhead factor (0.2 = 20% reserved for system operations) * @returns {string} The calculated max old space size flag */ export declare function maxOldSpaceSizeFlag(machine: MachinePresetResources, overhead?: number): string; /** * Takes the existing NODE_OPTIONS value, removes any existing max-old-space-size flag, and adds a new one. * @param {string | undefined} existingOptions - The existing NODE_OPTIONS value * @param {MachinePresetResources} machine - The machine preset configuration containing memory specifications * @param {number} [overhead=0.2] - The memory overhead factor (0.2 = 20% reserved for system operations) * @returns {string} The updated NODE_OPTIONS value with the new max-old-space-size flag */ export declare function nodeOptionsWithMaxOldSpaceSize(existingOptions: string | undefined, machine: MachinePresetResources, overhead?: number): string;