Private static long sTotalMemory;
Public static long getTotalMemory () {
If (sTotalMemory==0 l) {
Strings str1="/proc/meminfo";
Long initialMemory=1 l;
FileReader localFileReader=null;
BufferedReader localBufferedReader=null;
Try {
LocalFileReader=new FileReader (str1);
LocalBufferedReader=new BufferedReader (localFileReader, 8192);
String str2=localBufferedReader. ReadLine ();
If (str2!=null) {
String [] arrayOfString=str2. Split (" \ \ s + ");
InitialMemory=(long) Integer. The valueOf (arrayOfString [1]).
}
{} the catch (IOException var11)
} the finally {
}
STotalMemory=initialMemory;
}
Return sTotalMemory;
}
CodePudding user response:
About 1 g s, what is the effect? Before you use up again will oom