Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Not all virtual (linear) addresses must be mapped to anything. If the code accesses unmapped page, the page fault is risen. </p> <p>The physical page can be mapped to several virtual addresses simultaneously.</p> <p>In the 4 GB virtual memory there are 2 sections: 0x0... 0xbfffffff - is process virtual memory and 0xc0000000 .. 0xffffffff is a kernel virtual memory.</p> <ul> <li>How can the kernel map 896 MB from only 512 MB ?</li> </ul> <p>It maps up to 896 MB. So, if you have only 512, there will be only 512 MB mapped.</p> <p>If your physical memory is in 0x00000000 to 0x20000000, it will be mapped for direct kernel access to virtual addresses 0xC0000000 to 0xE0000000 (linear mapping).</p> <ul> <li>What about user mode processes in this situation?</li> </ul> <p>Phys memory for user processes will be mapped (not sequentially but rather random page-to-page mapping) to virtual addresses 0x0 .... 0xc0000000. This mapping will be the second mapping for pages from 0..896MB. The pages will be taken from free page lists.</p> <ul> <li>Where are user mode processes in phys RAM?</li> </ul> <p>Anywhere.</p> <ul> <li>Every article explains only the situation, when you've <em>installed 4 GB of memory</em> and the </li> </ul> <p>No. Every article explains how 4 Gb of virtual address space is mapped. The size of virtual memory is always 4 GB (for 32-bit machine without memory extensions like PAE/PSE/etc for x86)</p> <p>As stated in <code>8.1.3. Memory Zones</code> of the book <code>Linux Kernel Development</code> by Robert Love (I use third edition), there are several zones of physical memory:</p> <ul> <li>ZONE_DMA - Contains page frames of memory below 16 MB</li> <li>ZONE_NORMAL - Contains page frames of memory at and above 16 MB and below 896 MB</li> <li>ZONE_HIGHMEM - Contains page frames of memory at and above 896 MB</li> </ul> <p>So, if you have 512 MB, your ZONE_HIGHMEM will be empty, and ZONE_NORMAL will have 496 MB of physical memory mapped.</p> <p>Also, take a look to <code>2.5.5.2. Final kernel Page Table when RAM size is less than 896 MB</code> section of the book. It is about case, when you have less memory than 896 MB.</p> <p>Also, for ARM there is some description of virtual memory layout: <a href="http://www.mjmwired.net/kernel/Documentation/arm/memory.txt" rel="noreferrer">http://www.mjmwired.net/kernel/Documentation/arm/memory.txt</a></p> <p>The line 63 <code>PAGE_OFFSET high_memory-1</code> is the direct mapped part of 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.
 

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