Force memory allocation always to the same virtual address [duplicate]
问题 This question already has answers here : disable the randomness in malloc (6 answers) Closed 5 years ago . I'm experimenting with Pin, an instrumentation tool, which I use to compute some statistics based on memory address of my variables. I want to re-run my program with the information gathered by my instrumentation tool, but for that it's crucial that virtual memory addresses remain the same through different runs. In general, I should let the OS handle memory allocation, but in this case