[baudrier@salle224-14 Exercise1]$ gcc virtual_adress.c [baudrier@salle224-14 Exercise1]$ ./a.out je suis le pid 157247 main = 0x56435b8ae179 gettimeofday = 0x7fbdaf0c6870 &argc = 0x7ffcf1b50e1c &i = 0x7ffcf1b50e2c &j = 0x56435b8b2000 t = 0x56435b8b1060 m = 0x56435ff42310 [baudrier@salle224-14 BUT2]$ cat /proc/157247/maps 56435b8ad000-56435b8ae000 r--p 00000000 00:3e 22477647 /export/home/info-but24/baudrier/Documents/BUT2/SCR/SCR3.1/TP01/Exercise1/a.out 56435b8ae000-56435b8af000 r-xp 00001000 00:3e 22477647 /export/home/info-but24/baudrier/Documents/BUT2/SCR/SCR3.1/TP01/Exercise1/a.out 56435b8af000-56435b8b0000 r--p 00002000 00:3e 22477647 /export/home/info-but24/baudrier/Documents/BUT2/SCR/SCR3.1/TP01/Exercise1/a.out 56435b8b0000-56435b8b1000 r--p 00002000 00:3e 22477647 /export/home/info-but24/baudrier/Documents/BUT2/SCR/SCR3.1/TP01/Exercise1/a.out 56435b8b1000-56435b8b3000 rw-p 00003000 00:3e 22477647 /export/home/info-but24/baudrier/Documents/BUT2/SCR/SCR3.1/TP01/Exercise1/a.out 56435ff42000-56435ff63000 rw-p 00000000 00:00 0 [heap] 7fbdaee00000-7fbdaee24000 r--p 00000000 103:05 6028 /usr/lib/libc.so.6 7fbdaee24000-7fbdaef96000 r-xp 00024000 103:05 6028 /usr/lib/libc.so.6 7fbdaef96000-7fbdaf005000 r--p 00196000 103:05 6028 /usr/lib/libc.so.6 7fbdaf005000-7fbdaf009000 r--p 00204000 103:05 6028 /usr/lib/libc.so.6 7fbdaf009000-7fbdaf00b000 rw-p 00208000 103:05 6028 /usr/lib/libc.so.6 7fbdaf00b000-7fbdaf013000 rw-p 00000000 00:00 0 7fbdaf08f000-7fbdaf094000 rw-p 00000000 00:00 0 7fbdaf0c0000-7fbdaf0c4000 r--p 00000000 00:00 0 [vvar] 7fbdaf0c4000-7fbdaf0c6000 r--p 00000000 00:00 0 [vvar_vclock] 7fbdaf0c6000-7fbdaf0c8000 r-xp 00000000 00:00 0 [vdso] 7fbdaf0c8000-7fbdaf0c9000 r--p 00000000 103:05 6019 /usr/lib/ld-linux-x86-64.so.2 7fbdaf0c9000-7fbdaf0f3000 r-xp 00001000 103:05 6019 /usr/lib/ld-linux-x86-64.so.2 7fbdaf0f3000-7fbdaf101000 r--p 0002b000 103:05 6019 /usr/lib/ld-linux-x86-64.so.2 7fbdaf101000-7fbdaf103000 r--p 00039000 103:05 6019 /usr/lib/ld-linux-x86-64.so.2 7fbdaf103000-7fbdaf104000 rw-p 0003b000 103:05 6019 /usr/lib/ld-linux-x86-64.so.2 7fbdaf104000-7fbdaf105000 rw-p 00000000 00:00 0 7ffcf1b32000-7ffcf1b53000 rw-p 00000000 00:00 0 [stack] ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0 [vsyscall] - main appartient au segment de pages : 56435b8ae000-56435b8af000 r-xp 00001000 00:3e 22477647 /export/home/info-but24/baudrier/Documents/BUT2/SCR/SCR3.1/TP01/Exercise1/a.out -> C'est une fonction (donc du code) qui appartient au fichier a.out, et qui a besoin des droits d'exécutions (il a bien la permission 'x'). - gettimeofday : 7fbdaf0c6000-7fbdaf0c8000 r-xp 00000000 00:00 0 [vdso] -> Code du noyau, exécuté par le noyau - &argc : 7ffcf1b32000-7ffcf1b53000 rw-p 00000000 00:00 0 [stack] -> Argument de la fonction main(), se trouve dans la pile (stack) - &i : 7ffcf1b32000-7ffcf1b53000 rw-p 00000000 00:00 0 [stack] - &j : 56435b8b1000-56435b8b3000 rw-p 00003000 00:3e 22477647 /export/home/info-but24/baudrier/Documents/BUT2/SCR/SCR3.1/TP01/Exercise1/a.out - t : 56435b8b0000-56435b8b1000 r--p 00002000 00:3e 22477647 /export/home/info-but24/baudrier/Documents/BUT2/SCR/SCR3.1/TP01/Exercise1/a.out - m : 56435ff42000-56435ff63000 rw-p 00000000 00:00 0 [heap] -> malloc() attribue de la mémoire dans le tas (heap)