Hi,

Imagine simulating a system with terabytes of memory. Most likely a lot of
this memory will be untouched, and the host system can get away without
ever allocating the pages. If we now take a checkpoint and later restore,
we want to make sure this property does not go away. Hence, we avoid
touching the pages that are 0.

Andreas

On 12/08/2015 10:36, "gem5-dev on behalf of Ishan"
<[email protected] on behalf of [email protected]> wrote:

>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


-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered 
in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
Registered in England & Wales, Company No:  2548782
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to