This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Phil Bull
philbull@gmail.com 2011
Michael Hill
mdhillca@gmail.com 2011, 2014
View the memory map of a process.
Fran Dieguez
fran.dieguez@gnome.org 2022

# Usar mapas de memoria

Virtual memory is a representation of the combined physical memory and swap space in a system. It enables running processes to access more than the existing physical memory by mapping locations in physical memory to files on disk. When the system needs more pages of memory than are available, some of the existing pages will be paged out or written to the swap space.

The memory map displays the total virtual memory use of the process, and can be used to determine the memory cost of running a single or multiple instances of the program, to ensure the use of the correct shared libraries, to see the results of adjusting various performance tuning parameters the program may have, or to diagnose issues such as memory leaks.

To display the memory map of a process:

Prema a lapela Procesos.

Right click the desired process in the process list.

Prema Mapas de memoria.

# Lendo o mapa de memoria

Addresses are displayed in hexadecimal (base 16).

Sizes are displayed in IEC binary prefixes.

At runtime the process can allocate more memory dynamically into an area called the heap, and store arguments and variables into another area called the stack.

The program itself and each of the shared libraries has three entries each, one for the read-execute text segment, one for the read-write data segment and one for a read-only data segment. Both data segments need to be paged out at swap time.

## Propiedades

Nome de ficheiro | The location of a shared library that is currently used by the process. If this field is blank, the memory information in this row describes memory that is owned by the process whose name is displayed above the memory-map table.
Inicio da VM | The address at which the memory segment begins. VM Start, VM End and VM Offset together specify the location on disk to which the shared library is mapped.
Fin da VM | O enderezo na que remata o segmento de memoria.
Tamaño da VM | O tamaño do segmento de memoria

Bandeiras

As seguintes bandeiras describen os distintos tipos de accesos a segmentos de memoria que un proceso pode ter:

## p

O segmento de memoria é privado ao proceso, e non é accesíbel por outro proceso.

## r

O proceso ten permisos para ler do segmento de memoria

## s

O segmento de memoria compártese con outros procesadores.

## w

O proceso ten permisos para escribir nun segmento de memoria.

## x

O proceso ten permiso para executar instrucións que están contidas dentro do segmento de memoria.

Desprazamento da VM | A localización dun enderezo dentro dun segmento de memoria, medida desde o inicio da VM.
Privada, compartida, limpa ou sucia | As páxinas privadas son accedidas por un proceso shared pages can be accessed by more than one process clean pages have not yet been modified while in memory and can be discarded when designated to be swapped out dirty pages have been modified while in memory and must be written to disk when designated to be swapped out
Dispositivo | The major and minor numbers of the device on which the shared library filename is located. Together these specify a partition on the system.
Inodo | The inode on the device from which the shared library location is loaded into memory. An inode is the structure the filesystem uses to store a file, and the number assigned to it is unique.