Memory address

Memory addresses are used when accessing data for identifying a location on a storage medium, such as the designation of a memory cell in a RAM (see Memory Access) or a block on a hard disk.

Memory addresses are usually expressed in hexadecimal notation. They usually start at zero and be numbered consecutively in the rule.

We distinguish between logical and physical memory addresses. The logical address is the one which "sees" a program. Due to the memory management of the operating system these logical addresses are mapped to physical addresses. This figure is generally different for each process and transparent to the process. Thus, it is possible that a plurality of processes use the same logical addresses, but use different physical addresses. It is also possible to allocate a logical process more memory than is physically available. When accessing the physically non-existent memory regions, the CPU automatically throws an exception, which is caught by the operating system. The operating system can then provide additional memory in which it outsources example, other storage areas on the hard disk. This technique is called virtual memory.

However, certain physical address ranges can be displayed in multiple processes in the logical address space. This technique is also known as shared memory and is a form of interprocess communication.

Segmented addresses

Particularly interesting are addresses from a base address and an offset in the form of an integer value - are formed - also called offset. To calculate the actual memory address, the offset ( Offset) is added to the base address. So in segmentation in real mode the x86 processor family is a memory location after the segment scheme: specified offset. In addition to the address segment ( segment number 16 * ) of the offset is added. The real address can thus be calculated by using address = ( segment number * 16 ) offset.

In Protected Mode can be the starting address of the segment from the segment selector to determine. The offset is then added to obtain a linear logical storage address to the segment start address.

  • Memory management
527461
de