Mercurial > hg > svcore
diff base/StorageAdviser.h @ 1038:cc27f35aa75c cxx11
Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author | Chris Cannam |
---|---|
date | Tue, 03 Mar 2015 15:18:24 +0000 |
parents | 52303ec15cd2 |
children | adbd16d2c1e8 |
line wrap: on
line diff
--- a/base/StorageAdviser.h Tue Mar 03 09:33:59 2015 +0000 +++ b/base/StorageAdviser.h Tue Mar 03 15:18:24 2015 +0000 @@ -17,6 +17,8 @@ #ifndef _STORAGE_ADVISER_H_ #define _STORAGE_ADVISER_H_ +#include <cstdlib> + /** * A utility class designed to help decide whether to store cache data * (for example FFT outputs) in memory or on disk in the TempDirectory. @@ -57,8 +59,8 @@ * be nowhere the minimum amount of data can be stored. */ static Recommendation recommend(Criteria criteria, - int minimumSize, - int maximumSize); + size_t minimumSize, + size_t maximumSize); enum AllocationArea { MemoryAllocation, @@ -69,14 +71,14 @@ * Specify that we are planning to use a given amount of storage * (in kilobytes), but haven't allocated it yet. */ - static void notifyPlannedAllocation(AllocationArea area, int size); + static void notifyPlannedAllocation(AllocationArea area, size_t size); /** * Specify that we have now allocated, or abandoned the allocation * of, the given amount (in kilobytes) of a storage area that was * previously notified using notifyPlannedAllocation. */ - static void notifyDoneAllocation(AllocationArea area, int size); + static void notifyDoneAllocation(AllocationArea area, size_t size); /** * Force all subsequent recommendations to use the (perhaps @@ -86,8 +88,8 @@ static void setFixedRecommendation(Recommendation recommendation); private: - static long m_discPlanned; - static long m_memoryPlanned; + static size_t m_discPlanned; + static size_t m_memoryPlanned; static Recommendation m_baseRecommendation; };