Is three a limit in the heap size for HP UX jdk1.5?
-No, according to this test:
/opt/java1.5/bin/IA64W/java -d64 -Xms256m -Xmx8000m -jar memtest.jar MemTest
(c)jmu | mar 2016 | A simple test program
Creating a byte[] of 3145728 bytes size
A small piece of the array:
hhhhhhhhhh
Sleeping 30 secs
goodbye
Source code:
package memtest;
public class MemTest {
public MemTest() {
super();
}
public static void main(String[] args) {
MemTest memTest = new MemTest();
System.out.println("(c)jmu | mar 2016 | A simple test program");
int bytes = 3*1024*1024;
byte[] cosa = new byte[bytes];
System.out.println("Creating a byte[] of " + (bytes) + " bytes size");
String s = new String(new char[bytes]).replace("\0", "h");
cosa = s.getBytes();
System.out.println("A small piece of the array:");
System.out.println(s.substring(9, 19));
System.out.println("Sleeping 30 secs");
try{Thread.sleep(30000);}catch(Exception e){e.printStackTrace(System.out);}
System.out.println("goodbye");
}
}
Enjoy 😉