simgrid::mc::RegionSnapshot& subregion = region->privatized_data()[process_index];
return mc_translate_address_region(addr, &subregion, process_index);
}
- case simgrid::mc::StorageType::NoData:
- default:
+ default: // includes StorageType::NoData
xbt_die("Storage type not supported");
}
}
xbt_assert(region->contain(simgrid::mc::remote(addr)), "Trying to read out of the region boundary.");
switch (region->storage_type()) {
- case simgrid::mc::StorageType::NoData:
- default:
- xbt_die("Storage type not supported");
-
case simgrid::mc::StorageType::Flat:
return (char*)region->flat_data().get() + offset;
if (simgrid::mc::mmu::sameChunk((std::uintptr_t)addr, (std::uintptr_t)end)) {
// The memory is contained in a single page:
return mc_translate_address_region_chunked((uintptr_t)addr, region);
- } else {
- // The memory spans several pages:
- return MC_region_read_fragmented(region, target, addr, size);
}
+ // Otherwise, the memory spans several pages:
+ return MC_region_read_fragmented(region, target, addr, size);
}
- // We currently do not pass the process_index to this function so we assume
- // that the privatized region has been resolved in the callers:
- case simgrid::mc::StorageType::Privatized:
+ default:
+ // includes StorageType::NoData and StorageType::Privatized (we currently do not pass the process_index to this
+ // function so we assume that the privatized region has been resolved in the callers)
xbt_die("Storage type not supported");
}
}