Skip to content

[NFC] Remove duplication across allocate jit memory windows for x64 and arm64 - #129

Merged
Jingyu Ma (mazong1123) merged 1 commit into
microsoft:mainfrom
lucianopa-msft:lucianopa/nfc-clean-up
Mar 30, 2026
Merged

Jingyu Ma (mazong1123) merged 1 commit into
microsoft:mainfrom
lucianopa-msft:lucianopa/nfc-clean-up

Conversation

@lucianopa-msft

Copy link
Copy Markdown
Member

Just reduce duplication for consistency since only thing that differs now is the max_range.
So just a non-functional change that reduces code duplication.

@lucianopa-msft Luciano Almeida (lucianopa-msft) changed the title [NFC] Remove duplication across allocate jit memory for x64 and arm64 [NFC] Remove duplication across allocate jit memory windows for x64 and arm64 Mar 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown

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 refactors Windows JIT memory allocation to remove duplicated logic between x86_64 and aarch64 by sharing the same search/allocate loop and only varying max_range.

Changes:

  • Consolidates the Windows allocate_jit_memory_windows implementation for x86_64 and aarch64 into a single code path.
  • Replaces per-architecture duplicated loops with architecture-specific max_range definitions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/injector_core/common.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mazong1123 Jingyu Ma (mazong1123) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mazong1123
Jingyu Ma (mazong1123) merged commit 95a9d8a into microsoft:main Mar 30, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants