What does it mean if totalMemory is small, but totalPss is very large?

We have a problem with our application. Over time, we noticed that the value totalPssbecomes very large (depending on the device, it will be 300-700Mb):

    int pid = android.os.Process.myPid();
    int pids[] = new int[1];
    pids[0] = pid;
    android.os.Debug.MemoryInfo[] memoryInfoArray = activityManager.getProcessMemoryInfo(pids);
    if (memoryInfoArray.length > 0)
    {
        android.os.Debug.MemoryInfo thisProcessMemoryInfo = memoryInfoArray[0];

        Log.d("totalPss", thisProcessMemoryInfo.getTotalPss()+"");
    }

Here is a graph showing the results of a typical launch:

processMemoryInfo

But at the same time, the value totalMemorynever becomes very large (40-50 MB at max., But drops to 10 MB after GC).

    Log.d("totalMem", Runtime.getRuntime().totalMemory()+"");

Here is a graph showing that from the same run as above (please ignore units, this is actually in bytes):

enter image description here

getMemoryClass for this device indicates that we have 192 MB for the application:

    Log.d("getMemoryClass", activityManager.getMemoryClass()+"");

, , . , .

, , , , ? , largeHeap ( , )? - , ?

+4

Source: https://habr.com/ru/post/1614687/