I’m not sure if this is possible for all targets and platforms, and i’m not sure if it’s worth it. (And not urgent at all, only a possibility )
When allocator allocates, the resulting * mut (), when cast to an usize value, might not use up all bits available. While it differs a lot according to the allocator, i think it can remain consistent during the whole program execution.
If we can retrieve this information somehow, it can lay a solid foundation for tagged pointers. I think it may be accessed as a constant, or retrieved from the allocator API?
tagged pointer have different schemes. some use least significant bits(which is implied by the alignment, yeah), some use most significant bits(if they’re available).