In physical.cc, specifically the function unserializeStore()
(this function restores the
contents of memory from a checkpoint), I had a
question about a specific line of code:
for (uint32_t x = 0; x < bytes_read / sizeof(long); x++) {
// Only copy bytes that are non-zero, so we don't give
// the VM system hell
if (*(temp_page + x) != 0) {
pmem_current = (long*)(pmem + curr_size + x * sizeof(long));
*pmem_current = *(temp_page + x);
}
}
My question is: why do they only copy bytes that are non-zero?
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev