- // Otherwise, we need to store the page the hard way
- // (by reading its content):
- void* page = (char*) data + (i << xbt_pagebits);
- xbt_assert(mc_page_offset(page)==0, "Not at the beginning of a page");
- void* page_data;
- if (is_self) {
- page_data = page;
- } else {
- /* Adding another copy (and a syscall) will probably slow things a lot.
- TODO, optimize this somehow (at least by grouping the syscalls)
- if needed. Either:
- - reduce the number of syscalls;
- - let the application snapshot itself;
- - move the segments in shared memory (this will break `fork` however).
- */
- page_data = temp;
- MC_process_read(process, MC_ADDRESS_SPACE_READ_FLAGS_NONE,
- temp, page, xbt_pagesize, MC_PROCESS_INDEX_DISABLED);
- }
- pagenos[i] = mc_model_checker->page_store().store_page(page_data);