1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Limit number of OOM Errors swallowed by the indexer to 5.

This commit is contained in:
Markus Schorn 2010-05-20 12:39:12 +00:00
parent ae9ae4a2ec
commit aad1b851fb

View file

@ -183,6 +183,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
private final boolean fIsFastIndexer;
private long fFileSizeLimit= 0;
private InternalFileContentProvider fCodeReaderFactory;
private int fSwallowOutOfMemoryError= 5;
public AbstractIndexerTask(Object[] filesToUpdate, Object[] filesToRemove, IndexerInputAdapter resolver, boolean fastIndexer) {
super(resolver);
@ -765,6 +766,8 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
} catch (AssertionError e) {
th= e;
} catch (OutOfMemoryError e) {
if (--fSwallowOutOfMemoryError < 0)
throw e;
th= e;
}
if (th != null) {