int maxMemory = (int) Runtime.getRuntime().maxMemory();

04-28 12:49