Example from the docs included below. This is applicable to pointers to memory returned allocate_aligned method as well as the vanilla allocate method.
//Process A obtains the offset of the address
managed_shared_memory::handle handle =
segment.get_handle_from_address(processA_address);
//Process A sends this address using any mechanism to process B
//Process B obtains the handle and transforms it again to an address
managed_shared_memory::handle handle = ...
void * processB_address = segment.get_address_from_handle(handle)