comparison base/StorageAdviser.cpp @ 1103:e86a7ea3dc38 simple-fft-model

Fix a cache-related dumbitude
author Chris Cannam
date Tue, 16 Jun 2015 20:28:23 +0100
parents 329ddaf7415d
children 393134235fa0
comparison
equal deleted inserted replaced
1102:12f3b48668d4 1103:e86a7ea3dc38
89 89
90 ssize_t minmb = ssize_t(minimumSize / 1024 + 1); 90 ssize_t minmb = ssize_t(minimumSize / 1024 + 1);
91 ssize_t maxmb = ssize_t(maximumSize / 1024 + 1); 91 ssize_t maxmb = ssize_t(maximumSize / 1024 + 1);
92 92
93 if (memoryFree == -1) memoryStatus = Unknown; 93 if (memoryFree == -1) memoryStatus = Unknown;
94 else if (memoryFree < memoryTotal / 3) memoryStatus = Insufficient; 94 else if (memoryFree < memoryTotal / 3 && memoryFree < 512) memoryStatus = Insufficient;
95 else if (minmb > (memoryFree * 3) / 4) memoryStatus = Insufficient; 95 else if (minmb > (memoryFree * 3) / 4) memoryStatus = Insufficient;
96 else if (maxmb > (memoryFree * 3) / 4) memoryStatus = Marginal; 96 else if (maxmb > (memoryFree * 3) / 4) memoryStatus = Marginal;
97 else if (minmb > (memoryFree / 3)) memoryStatus = Marginal; 97 else if (minmb > (memoryFree / 3)) memoryStatus = Marginal;
98 else if (memoryTotal == -1 || 98 else if (memoryTotal == -1 ||
99 minmb > (memoryTotal / 10)) memoryStatus = Marginal; 99 minmb > (memoryTotal / 10)) memoryStatus = Marginal;