Hello,
I'd like to be able to get the size of the heap as a variable. I don't need to change the size, just know what it is and have it in a variable.
Thanks!
Hello,
I'd like to be able to get the size of the heap as a variable. I don't need to change the size, just know what it is and have it in a variable.
Thanks!
I haven't tried this before so I can't guarantee this will work, but try Runtime.totalMemory()
.
You can get application run time information
Runtime rt = Runtime.getRuntime();
rt.freeMemory();
rt.totalMemory();