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:
parent
ae9ae4a2ec
commit
aad1b851fb
1 changed files with 3 additions and 0 deletions
|
@ -183,6 +183,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
|
||||||
private final boolean fIsFastIndexer;
|
private final boolean fIsFastIndexer;
|
||||||
private long fFileSizeLimit= 0;
|
private long fFileSizeLimit= 0;
|
||||||
private InternalFileContentProvider fCodeReaderFactory;
|
private InternalFileContentProvider fCodeReaderFactory;
|
||||||
|
private int fSwallowOutOfMemoryError= 5;
|
||||||
|
|
||||||
public AbstractIndexerTask(Object[] filesToUpdate, Object[] filesToRemove, IndexerInputAdapter resolver, boolean fastIndexer) {
|
public AbstractIndexerTask(Object[] filesToUpdate, Object[] filesToRemove, IndexerInputAdapter resolver, boolean fastIndexer) {
|
||||||
super(resolver);
|
super(resolver);
|
||||||
|
@ -765,6 +766,8 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
|
||||||
} catch (AssertionError e) {
|
} catch (AssertionError e) {
|
||||||
th= e;
|
th= e;
|
||||||
} catch (OutOfMemoryError e) {
|
} catch (OutOfMemoryError e) {
|
||||||
|
if (--fSwallowOutOfMemoryError < 0)
|
||||||
|
throw e;
|
||||||
th= e;
|
th= e;
|
||||||
}
|
}
|
||||||
if (th != null) {
|
if (th != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue