cpuCache() fix (windows)

This commit is contained in:
Sebastian Hildebrandt
2021-11-19 07:18:40 +01:00
parent 4d2027d770
commit bac127bcb6
4 changed files with 12 additions and 6 deletions
+5 -5
View File
@@ -1428,16 +1428,16 @@ function cpuCache(callback) {
const installedSize = util.getValue(lines, 'InstalledSize');
// L1 Instructions
if (level === '3' && cacheType === '3') {
result.cache.l1i = parseInt(installedSize, 10);
result.l1i = parseInt(installedSize, 10);
}
// L1 Data
if (level === '3' && cacheType === '4') {
result.cache.l1d = parseInt(installedSize, 10);
result.l1d = parseInt(installedSize, 10);
}
// L1 all
if (level === '3' && cacheType === '5' && !result.cache.l1i && !result.cache.l1d) {
result.cache.l1i = parseInt(installedSize, 10) / 2;
result.cache.l1d = parseInt(installedSize, 10) / 2;
if (level === '3' && cacheType === '5' && !result.l1i && !result.l1d) {
result.l1i = parseInt(installedSize, 10) / 2;
result.l1d = parseInt(installedSize, 10) / 2;
}
});
}