以下の無限ループのコードを使用してみました
public class OOME_Collection {
static List l = new ArrayList();
static Long i= new Long(1) ;
public static void main(String[] args) {
while (true) {
l.add(i);
i++;
System.out.println("size " + l.size());
}
}
}
最後の SOP は : サイズ 3310522 なぜ OOME エラーが発生せず、さらにヒープ サイズが 50 MB から 100 MB まで変動し続けるのか