Completed implementation of with_*_shifted_memory_type