I'm using IntelliJ as an editor. These are my vmoptions:
-Xms1024m
-Xmx4096m
-XX:MaxPermSize=700m
-XX:ReservedCodeCacheSize=480m
-XX:SoftRefLRUPolicyMSPerMB=50
Is there anything else I can change in the settings to make it work for me?
My algorithm tries to calculate the Matrix Chain Multiplication Problem via Branch&Bound and in this part(code below) I'm performing deapth-search/creating successors etc. I assume this recursion triggers the heap problem.
public static SimpleMCPNode createTree(SimpleMCPNode currentNode) {
//other statements
.
.
.
.
for (int i = 0; i < currentNode.matrices.size() - 1; i++) {
List<MatrixInfo> adaptedList = new ArrayList(currentNode.matrices);
currentNode.successors.add(createTree(currentNode.createSuccessor(adaptedList, i)));
}
//other statements
.
.
Depending on the input it can grow exponentially...