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("*****************************************");
}