Is the pointer guaranteed to be > a certain value?

前端 未结 5 1433
猫巷女王i
猫巷女王i 2021-01-18 17:37

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

5条回答
  •  后悔当初
    2021-01-18 18:03

    There is no standard for where valid memory addresses come from; to write safe system-independent code, you cannot rely on certain addresses (and even with anecdotal support, you never know when that will change with a new system update).

提交回复
热议问题