Commit 0d4f86a
committed
snapshot: avoid duplicating pages mapped multiple times
Previously, if a sandbox mapped one physical page to multiple virtual
addresses, taking a snapshot would duplicate the page. This commit
changes the logic around snapshots to keep track of the physical pages
that have been encountered during the virtual memory traversal so far,
and ensure that the same page is not copied multiple times. Note that
this does not (yet) track the contents of pages to allow
de-duplicating them---it merely ensures that two mappings of the same
physical address do not result in needless duplication.
Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>1 parent 9f25a1b commit 0d4f86a
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
| 451 | + | |
450 | 452 | | |
451 | 453 | | |
452 | 454 | | |
| |||
458 | 460 | | |
459 | 461 | | |
460 | 462 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | 463 | | |
465 | 464 | | |
466 | 465 | | |
| |||
473 | 472 | | |
474 | 473 | | |
475 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
476 | 480 | | |
477 | | - | |
| 481 | + | |
478 | 482 | | |
479 | 483 | | |
480 | 484 | | |
| |||
0 commit comments