[vm, ios] Check for the right sentinel value from GenericMapAligned.

TEST=engine
Change-Id: Ic4d0783654d3e795ca3ec7cf342dca448c9ea674
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222328
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak 2021-12-08 01:22:49 +00:00 committed by Commit Bot
parent d5b3632868
commit 891f2668a7

View file

@ -138,7 +138,7 @@ void VirtualMemory::Init() {
nullptr, PROT_NONE, allocated_size, kCompressedHeapPageSize,
allocated_size + kCompressedHeapPageSize,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE);
if (address == MAP_FAILED) continue;
if (address == nullptr) continue;
MemoryRegion region(address, allocated_size);
region = ClipToAlignedRegion(region, kCompressedHeapAlignment);