We previously shrunk the mmap range size on ios, but those settings got inherited by apple silicon macs.
Don't shrink the vm range on apple silicon Mac since we have access to the full range.
Also don't shrink vm range for iOS simulators because they have the same range as the host OS, not the simulated OS.
rdar://75302812
This doesn't look quite right. This change will mean we will use
on arm64 macOS. But there we want to be use using (1 << 47) to match x86_64 macOS, not (1 << 48).
Maybe something like this instead?
#elif defined(__aarch64__) # if SANITIZER_MAC # if SANITIZER_OSX # define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 47) # else // Darwin iOS/ARM64 has a 36-bit VMA, 64GiB VM # define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 36) # endif # else # define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 48) # endif #elif defined(__sparc__) ....