comparison base/StorageAdviser.cpp @ 335:02d2ad95ea52 spectrogram-cache-rejig

* Get storage advice for each cache in an FFT data server. Allows us to be more confident about the actual memory situation and cut over from memory to disc part way through an FFT calculation if necessary. StorageAdviser is now a bit too optimistic though (it's too keen to allocate large numbers of small blocks in memory).
author Chris Cannam
date Tue, 13 Nov 2007 13:54:10 +0000
parents aa8dbac62024
children 7cc6b7b0d819
comparison
equal deleted inserted replaced
334:aa8dbac62024 335:02d2ad95ea52
75 else if (minmb > (memoryFree * 3) / 4) memoryStatus = Insufficient; 75 else if (minmb > (memoryFree * 3) / 4) memoryStatus = Insufficient;
76 else if (maxmb > (memoryFree * 3) / 4) memoryStatus = Marginal; 76 else if (maxmb > (memoryFree * 3) / 4) memoryStatus = Marginal;
77 else if (minmb > (memoryFree / 3)) memoryStatus = Marginal; 77 else if (minmb > (memoryFree / 3)) memoryStatus = Marginal;
78 else if (memoryTotal == -1 || 78 else if (memoryTotal == -1 ||
79 minmb > (memoryTotal / 10)) memoryStatus = Marginal; 79 minmb > (memoryTotal / 10)) memoryStatus = Marginal;
80 else if (memoryFree < memoryTotal / 4) memoryStatus = Marginal;
80 else memoryStatus = Sufficient; 81 else memoryStatus = Sufficient;
81 82
82 if (discFree == -1) discStatus = Unknown; 83 if (discFree == -1) discStatus = Unknown;
83 else if (minmb > (discFree * 3) / 4) discStatus = Insufficient; 84 else if (minmb > (discFree * 3) / 4) discStatus = Insufficient;
84 else if (maxmb > (discFree / 4)) discStatus = Marginal; 85 else if (maxmb > (discFree / 4)) discStatus = Marginal;