25 lines
676 B
Java
25 lines
676 B
Java
package com.kofax.kmc.kut.utilities;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class MemoryHelper {
|
|
private static final String TAG = "MemoryHelper";
|
|
private static long nD;
|
|
private static long nE;
|
|
private static long nF;
|
|
private static long nG;
|
|
|
|
public static long getTotalFreeMemory() {
|
|
nD = Runtime.getRuntime().maxMemory();
|
|
nE = Runtime.getRuntime().freeMemory();
|
|
long j = Runtime.getRuntime().totalMemory();
|
|
nF = j;
|
|
long j2 = j - nE;
|
|
nG = j2;
|
|
return nD - j2;
|
|
}
|
|
|
|
public static float getTotalFreeMemoryAsPctOfMax() {
|
|
return ((float) getTotalFreeMemory()) / ((float) nD);
|
|
}
|
|
}
|