Memory address

from Wikipedia, the free encyclopedia

Memory addresses are used to uniquely identify memory cells in the main memory of a computer . They are used in memory access to designate the exact location that is being accessed. The specifics of the addressing depend on the specific hardware and are not standardized.

Memory addresses typically start at zero and are i. d. Usually numbered in ascending order and consecutively. They are usually specified as unsigned integers and in hexadecimal notation .

Logical and physical addresses

One differentiates:

The logical address is that which a program "sees". These logical addresses are mapped to physical addresses by the memory management unit . This mapping is generally different for each process and transparent for the process. This makes it possible for several processes to use the same logical addresses but access different physical addresses.

It is also possible to allocate more logical memory to a process than is physically available. When accessing the physically non-existent memory areas, the  CPU automatically throws an exception , which is caught by the operating system . The operating system can then provide additional memory, by example, other storage areas on the hard drive outsourcing . This technique is called virtual memory management .

However, certain physical address areas can be displayed in several processes in the logical address space. This technique is also called shared memory and is a form of interprocess communication .

Segmented addresses

Memory addresses are a specialty in which an offset in the form of an integer value - also called an offset - is added to a base address .

  • In segmentation in real mode of x86 - Processor family a memory location specified by the schema Segment:Offset. The real address can be calculated as:
  • In the protected mode , the start address of the segment can be determined from the segment selector . The offset is then added to this segment start address in order to obtain a linear logical memory address.