|
How to get memory status of mobile handset |
|
|
This Java tip explains the method of generating Memory Status of the
mobile handset. This J2ME application will help game developer to find
out the memory statistic of the device. This may help to make heavy mobile
applications more efficient in terms of memory usage.
public static void printMemoryStatistics()
{
Runtime rt=Runtime.getRuntime() ;
System.out.println("***************MemoryStatistics***********");
System.out.println("freeMemory="+rt.freeMemory());
System.out.println("totalMemory="+rt.totalMemory());
System.out.println("freeMemory="+(rt.totalMemory()-rt.freeMemory()) );
System.out.println("*****************************************");
}
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.