-- big_mem.adb determine largest matrix on this machine with Ada.Text_Io; use Ada.Text_Io; procedure Big_Mem is N : Integer := 1000; -- multiple of 100 type Matrix is array(Integer range <>,Integer range <>) of Long_Float; A : Matrix(1..N,1..N); begin Put_Line("big_mem.adb running, n="&Integer'Image(N)); for I in 1..N/100 loop for J in 1..N/100 loop A(100*I,100*J) := 0.0; end loop; end loop; Put_Line("allocated and used "&Integer'Image(8*N*N)&" bytes"); end Big_Mem; -- -- results when run -- " -- big_mem.adb running, n= 1000 -- Allocated and Used 8000000 bytes -- " -- fails at N := 1100