Skip to content

Add process memory priority foundation#15

Merged
PrimeBuild-pc merged 2 commits into
mainfrom
codex/process-memory-priority-foundation
May 20, 2026
Merged

Add process memory priority foundation#15
PrimeBuild-pc merged 2 commits into
mainfrom
codex/process-memory-priority-foundation

Conversation

@PrimeBuild-pc
Copy link
Copy Markdown
Owner

@PrimeBuild-pc PrimeBuild-pc commented May 20, 2026

Summary

  • Adds a backend/testable process memory priority foundation using GetProcessInformation / SetProcessInformation with ProcessMemoryPriority and MEMORY_PRIORITY_INFORMATION.
  • Adds the documented ThreadPilot memory priority model levels: VeryLow, Low, Medium, BelowNormal, and Normal.
  • Extends persistent process rules with optional memory priority application and result reporting.
  • Registers fakeable native/service abstractions in DI.

Notes

Memory priority is not CPU priority. CPU priority influences CPU scheduling. Memory priority is a hint to Windows about how aggressively process memory can be reclaimed or paged under memory pressure.

Safety and limits

  • No preset generator changes.
  • No CPU topology migration changes.
  • No affinity apply path redesign.
  • No Windows Service implementation.
  • No registry/IFEO persistence.
  • No UI redesign.
  • No version bump or tag.
  • No anti-cheat or protected process bypass claim.

Tests

  • dotnet test "ThreadPilot_1.sln" --configuration Release --no-restore
  • Result: 282 passed, 0 failed, 0 skipped.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 20, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 67.40088% with 74 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Services/ProcessMemoryPriorityService.cs 62.75% 44 Missing and 10 partials ⚠️
...atforms/Windows/IProcessMemoryPriorityNativeApi.cs 0.00% 16 Missing ⚠️
Services/PersistentRulesEngine.cs 94.73% 0 Missing and 2 partials ⚠️
Services/ServiceConfiguration.cs 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@PrimeBuild-pc PrimeBuild-pc marked this pull request as ready for review May 20, 2026 19:45
@PrimeBuild-pc PrimeBuild-pc merged commit 5f9f7b5 into main May 20, 2026
2 checks passed
@PrimeBuild-pc PrimeBuild-pc deleted the codex/process-memory-priority-foundation branch May 20, 2026 19:45
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.

2 participants