Commit ab8f7a4
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 5d45136 commit ab8f7a4
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| 447 | + | |
| 448 | + | |
447 | 449 | | |
448 | 450 | | |
449 | 451 | | |
| |||
455 | 457 | | |
456 | 458 | | |
457 | 459 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | 460 | | |
462 | 461 | | |
463 | 462 | | |
| |||
470 | 469 | | |
471 | 470 | | |
472 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
473 | 477 | | |
474 | | - | |
| 478 | + | |
475 | 479 | | |
476 | 480 | | |
477 | 481 | | |
| |||
0 commit comments