jump to navigation

Linux memory management August 11, 2005

Posted by Coolguy in Linux.
  • 32-bit architectures can reference 4 GB of physical memory
  • Processors that have an MMU (Memory Management Unit) support the concept of virtual memory
  • Page tables are set up by the kernel which map “virtual addresses” to “physical addresses
  • This means each process can access 4 GB of memory, thinking it’s the only process running on the machine
  • The virtual address to physical address mappings are done by the kernel
  • When a new process is forked, the kernel creates a new set of page tables for the process
  • The addresses referenced within a process in user-space are virtual addresses
  • They do not necessarily map directly to the same physical address
  • The virtual address is passed to the MMU (Memory Management Unit of the processor) which converts it to the proper physical address based on the tables set up by the kernel.
  • Hence, two processes can refer to memory address 0x08329, but they would refer to two different locations inmemory.
  • The Linux kernel splits the 4 GB virtual address space of a process in two parts: 3 GB and 1 GB
  • The lower 3 GB of the process virtual address space is accessible as the user-space virtual addresses and the upper 1 GB space is reserved for the kernel virtual addresses
  • The kernel virtual area (3 – 4 GB address space) maps to the first 1GB of physical RAM.
  • The 3 GB addressable RAM available to each process is mapped to the available physical RAM
  • The basic problem here is, the kernel can just address 1 GB of virtual addresses, which can translate to a maximum of 1 GB of physical memory


  • HIGHMEM is a kernel configuration option that allows Linux to handle optionally 4giga of RAM or 64giga of RAM (64giga is possible using PAE physical address extension three level pagetables) on IA32





No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: