Skip to content

Remove unused mapped_rgns field from memory manager#1510

Open
ludfjig wants to merge 1 commit into
hyperlight-dev:mainfrom
ludfjig:cleanup-mapped-rgns
Open

Remove unused mapped_rgns field from memory manager#1510
ludfjig wants to merge 1 commit into
hyperlight-dev:mainfrom
ludfjig:cleanup-mapped-rgns

Conversation

@ludfjig
Copy link
Copy Markdown
Contributor

@ludfjig ludfjig commented Jun 5, 2026

Remove the unused mapped_rgns counter from SandboxMemoryManager. #742 replaced the old count-diff restore with Vec set-difference and deleted every reader.

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 5, 2026 00:38
@ludfjig ludfjig added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Jun 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the unused mapped_rgns counter from SandboxMemoryManager, along with the last remaining increments at mapping sites. This simplifies the host memory manager state now that snapshot restore logic tracks mappings via region set-differences (as introduced in #742), and no readers remain.

Changes:

  • Removed the mapped_rgns: u64 field from SandboxMemoryManager and its initialisation/copying paths.
  • Deleted mapped_rgns increment sites during sandbox evolve and mapping operations.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/hyperlight_host/src/sandbox/uninitialized_evolve.rs Removes obsolete mapped_rgns increment during apply-pending file mappings.
src/hyperlight_host/src/sandbox/initialized_multi_use.rs Removes obsolete mapped_rgns increments when mapping regions / file mappings.
src/hyperlight_host/src/mem/mgr.rs Removes mapped_rgns from SandboxMemoryManager struct and constructors/build paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants