Hola Elhacker alguien sabe como puedo listar la memoria usada por un proceso
algo como esto:
Free, 0x0, 64 kB, NA
Mapped (Commit), 0x10000, 64 kB, RW
Mapped (Commit), 0x20000, 28 kB, R
Free, 0x27000, 36 kB, NA
Mapped (Commit), 0x30000, 16 kB, R
Free, 0x34000, 48 kB, NA
Mapped (Commit), 0x40000, 8 kB, R
Free, 0x42000, 56 kB, NA
Private (Commit), 0x50000, 4 kB, RW
Free, 0x51000, 60 kB, NA
locale.nls: Mapped (Commit), 0x60000, 412 kB, R
Free, 0xc7000, 36 kB, NA
Mapped (Commit), 0xd0000, 8 kB, RW
Free, 0xd2000, 56 kB, NA
Private (Commit), 0xe0000, 4 kB, RW
Free, 0xe1000, 60 kB, NA
Private (Commit), 0xf0000, 4 kB, RW
Free, 0xf1000, 60 kB, NA
Private (Commit), 0x100000, 8 kB, RW
Private (Reserve), 0x102000, 56 kB,
Mapped (Commit), 0x110000, 8 kB, R
Free, 0x112000, 56 kB, NA
Mapped (Commit), 0x120000, 4 kB, RW
Free, 0x121000, 60 kB, NA
Private (Reserve), 0x130000, 432 kB,
Private (Commit), 0x19c000, 12 kB, RW+G
Private (Commit), 0x19f000, 68 kB, RW
Mapped (Commit), 0x1b0000, 8 kB, R
Free, 0x1b2000, 184 kB, NA
Private (Commit), 0x1e0000, 132 kB, RW
Private (Reserve), 0x201000, 380 kB,
Free, 0x260000, 64 kB, NA
Private (Commit), 0x270000, 28 kB, RW
Private (Reserve), 0x277000, 36 kB,
Free, 0x280000, 256 kB, NA
Private (Commit), 0x2c0000, 320 kB, RW
Private (Reserve), 0x310000, 704 kB,
Private (Commit), 0x3c0000, 128 kB, RW
Private (Reserve), 0x3e0000, 896 kB,
Mapped (Commit), 0x4c0000, 60 kB, R
Mapped (Reserve), 0x4cf000, 1.44 MB,
Mapped (Commit), 0x640000, 12 kB, R
Mapped (Reserve), 0x643000, 20 kB,
Free, 0x648000, 32 kB, NA
Mapped (Commit), 0x650000, 1.5 MB, R
Con la function de la API de Windows VirtualQuery.
Hola gracias por la respuesta acabo de mirar esa API y veo ese parametro "lpAddress"
me pide una direccion pero yo quiero obtener la direccion, la propiedad de la memoria, el tamaño como puedo con esa api obtener la direccion si es la misma direccion que me pide?
Tenes que hacer un bucle preguntando desde 0 sumando el tamaño de cada region hasta que VirtualQuery te devuelva 0 y GetLastError sea ERROR_INVALID_PARAMETER.
PD. Para otro proceso que no sea tu programa, tenes que usar VirtualQueryEx con HANDLE del mismo (OpenProcess).
Muchas gracias
De nadas ::)