1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-05-20 00:43:59 +00:00
parent 15ef53b2b7
commit 8d7890cb73

View file

@ -287,7 +287,7 @@ public class PDOMManager implements IWritableIndexManager, IListener {
int cacheMax= prefs.getInt(CCorePlugin.PLUGIN_ID, CCorePreferenceConstants.MAX_INDEX_DB_CACHE_SIZE_MB, 64, null);
cachePct= Math.max(1, Math.min(50, cachePct)); // 1%-50%
cacheMax= Math.max(1, cacheMax); // >= 1mb
long m1= Runtime.getRuntime().maxMemory()/100L * cachePct;
long m1= Runtime.getRuntime().maxMemory() / 100L * cachePct;
long m2= Math.min(m1, cacheMax * 1024L * 1024L);
ChunkCache.getSharedInstance().setMaxSize(m2);
}