While debugging some C++ code with tons of pointers it would be useful if the memory addresses between runs were the same. Is there any way to make the series of addresses that are returned between consecutive runs of a program that perform the same memory allocations deterministic?
Maybe an environment variable or something that can be set for the debug heap?
I am aware that there are many good reasons you want randomization for release builds, but determinism is handy for debugging in some situations (e.g. something is not getting linked up correctly while modifying a graph).
(Converted from comment)
You may want to replace operator new. In your own version, create a single large memory mapping at a fixed base address. The chances are >99% of it being free in a 64 bits address space. Then just allocate sequentially from this block.