qvdjs 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -676,6 +676,9 @@ function estimateMemoryUsage(symbolTableSize, maxRows, totalRows) {
|
|
|
676
676
|
return keptSymbolsMemory + skippedSymbolsMemory;
|
|
677
677
|
}
|
|
678
678
|
function validateMemoryAvailability(symbolTableSize, maxRows, totalRows, filePath, safetyFactor = 0.3) {
|
|
679
|
+
if (typeof safetyFactor !== "number" || safetyFactor < 0 || safetyFactor > 1) {
|
|
680
|
+
throw new exports.QvdValidationError("safetyFactor must be a number between 0.0 and 1.0", { safetyFactor });
|
|
681
|
+
}
|
|
679
682
|
const availableMemory = os__default.default.freemem();
|
|
680
683
|
const heapLimit = getHeapLimit();
|
|
681
684
|
const estimatedMemory = estimateMemoryUsage(symbolTableSize, maxRows, totalRows);
|