为什么在C中每次执行后变量的地址都会发生变化?

Moh*_*hit 3 c pointers programming-languages

int i=10;
printf("Address of i = %u",&i);

Output:
Address if i = 3220204848

Output on re-execution:
Address of i = 3216532594
Run Code Online (Sandbox Code Playgroud)

i每次执行程序时,我都会得到一个新地址.这意味着什么?

Dea*_*ing 7

它表示每次运行程序时都会加载一个不同的(虚拟)地址.这是一种称为地址空间布局随机化(ASLR)的功能,是大多数现代操作系统的一项功能.