How can I find the maximum byte array size that will not exceed the VM limit?
What I tried is:
int size = Integer.MAX_VALUE;
byte[] request = new byte[size];
But then I get the error: Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit
The backstory is my packet proxy keeps missing parts of a packet because I don't know what the max memory size I can use is.
Thanks!