Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's almost a year and I figured it out.</p> <p><strong>clean memory</strong> </p> <p>clean memory are memories that can be recreated, on iOS it is memory of:</p> <ul> <li>system framework</li> <li>binary executable of your app</li> <li>memory mapped files</li> </ul> <p>Also notice this situation: when your app link to a framework, the clean memory will increase by the size of the framework binary. But most of time, only part of binary is really loaded in physical memory.</p> <p><strong>dirty memory</strong></p> <p>All memory that is not clean memory is dirty memory, dirty memory can't be recreated by system. </p> <p>When there is a memory pressure, system will unload some clean memory, when the memory is needed again, system will recreate them. </p> <p>But for dirty memory, system can't unload them, and iOS has no swap mechanism, so dirty memory will always be kept in physical memory, till it reach a certain limit, then your App will be terminated and all memory for it is recycled by system.</p> <p><strong>virtual memory</strong></p> <pre><code>virtual memory = clean memory + dirty memory. </code></pre> <p>That means virtual memory is all the memory your App want.</p> <p><strong>resident memory</strong></p> <pre><code>resident memory = dirty memory + clean memory that loaded in physical memory </code></pre> <p>resident memory is the memory really loaded in your physical memory, it mean all the dirty memory and parts of your clean memory.</p> <p><strong>conclusion</strong></p> <p>At any time, this is always true:</p> <pre><code>virtual memory == (clean memory + dirty memory) &gt; resident memory &gt; dirty memory </code></pre> <p>If you are worrying about the physical memory your App is taking(which is the key reason your App is terminated due to low memory), you should mainly focus on resident memory.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload