modor
10/11/2017 - 7:31 AM

StackOOM

StackOOM

/**
 * VM args: -Xss128k
 */

public class StackOOM {

	private int stackLength = 1;

	public int getStackLength() {
		return stackLength;
	}

	public void setStackLength(int stackLength) {
		this.stackLength = stackLength;
	}

	public void stackLeak() {
		stackLength++;
		stackLeak();
	}

	public static void main(String[] args) {

		StackOOM s = new StackOOM();
		s.stackLeak();
	}

}