When running several times the same C programm, the address returned by malloc is always different. Is it possible to force Linux/gcc to always get the same adresses for a memory allocation ?
Thanks, Fred
When running several times the same C programm, the address returned by malloc is always different. Is it possible to force Linux/gcc to always get the same adresses for a memory allocation ?
Thanks, Fred
The only way to do this is to assign the same address everytime, as in this question. However what you're doing is questionable, and it is most likely the case there's a better way of doing what you want to do, rather than always getting the same address.