Change same_allocation to accept wide pointers
#3684
Merged
same_allocation to accept wide pointers
#3684