Browse Source

PTA fix: clear memory after memout crash.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@2388 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
c921d83884
  1. 5
      prism/src/explicit/IndexedSet.java
  2. 2
      prism/src/pta/Modules2PTA.java

5
prism/src/explicit/IndexedSet.java

@ -48,6 +48,11 @@ public class IndexedSet<T>
indexOfLastAdd = -1;
}
public void clear()
{
set.clear();
}
public boolean add(T state)
{
Integer i = set.get(state);

2
prism/src/pta/Modules2PTA.java

@ -592,6 +592,8 @@ public class Modules2PTA
}
// Catch a (possibly) common source of mem-out errors during explicit-state reachability
catch (OutOfMemoryError e) {
states.clear();
System.gc();
throw new PrismLangException("Out of memory after exploring " + (src + 1) + " states of module " + module.getName(), module);
}

Loading…
Cancel
Save