public static boolean memoryIsLow(){
  return availableMemory() * 100 < RUNTIME.totalMemory() * 5;
}

public static boolean memoryIsLow ( ) { return availableMemory ( ) * 100 < RUNTIME . totalMemory ( ) * 5 ; }
returns true if less then 5 % of the available memory is free .
