Random idea: A GC'd language where you could manually free objects and they'd get recycled immediately. If you accidentally use them again you get an exception. Implementation uses some sort of generational pointer scheme folded into the read/write barrier.
Conversation
Replying to
ARMv8.5 memory tagging provides a way to enforce memory safety between ~16 generations of allocations in the same address space. Once you go through all the possible tags it's not possible to keep reusing the same address space without confirming the old pointers are gone though.
2
6
For compacting GC, could use one tag for active and another for free and skip over the free ones when moving to a new compacted heap. Next time around, increment the tags. Once available tags have run out avoid using that address space again until confirming pointers are gone.
