In C ++, when I do new(or even malloc), is there any guarantee that the return address will be greater than a certain value? Because ... in this project, I find it useful to use 0-1k as an enumeration. But I would not want to do this if it could be obtained so low. My only target systems are 32 or 64 bit processors with OS window / linux and mac.
Does the standard talk about pointers? Do windows or linux say something about their C runtime and what is the lowest memory address (for ram)?
-edit- I end up modifying my overload newto check if the address is above> 1k. I call std :: terminate if it is not.
user34537
source
share