Control heap allocation into a certain memory range?

The motivation is to keep all the objects heap allocated in a certain range so that I can dump that part of memory which contains all the objects.

Is there possible to control heap allocation, say all the heap allocated objects are between 0x400000 to 0x500000?Or Is it possible to use customised allocator (so that i can control it)?


Custom allocators are a nightly-only feature:

I'm not aware of how to do it otherwise, maybe someone else does.