From 911c189dfbaa6733f0ee21e01ad6fe49160ba38f Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Fri, 30 Mar 2007 12:41:31 +0000 Subject: [PATCH] Fix related to 180164, chunk-cache size was fixed to 5mb --- .../eclipse/cdt/internal/core/pdom/db/ChunkCache.java | 9 +++++++++ .../internal/core/pdom/indexer/PDOMIndexerTask.java | 10 +++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/ChunkCache.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/ChunkCache.java index 41e3e469d24..36be4aa0f29 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/ChunkCache.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/ChunkCache.java @@ -100,6 +100,13 @@ public final class ChunkCache { } } + /** + * Returns the maximum size of the chunk cache in bytes. + */ + public synchronized long getMaxSize() { + return (long) fPageTable.length * Database.CHUNK_SIZE; + } + /** * Clears the page table and changes it to hold chunks with * maximum total memory of maxSize. @@ -113,6 +120,7 @@ public final class ChunkCache { System.arraycopy(fPageTable, 0, newTable, 0, oldLength); fTableIsFull= false; fPointer= oldLength; + fPageTable= newTable; } else { for (int i=newLength; i