Skip to content

Preserve memory budgets across suspendable execution - #830

Draft
Maksym (maksym-mishchenko) wants to merge 17 commits into
microsoft:mainfrom
maksym-mishchenko:maksym-mishchenko-suspendable-memory-budgets
Draft

Maksym (maksym-mishchenko) wants to merge 17 commits into
microsoft:mainfrom
maksym-mishchenko:maksym-mishchenko-suspendable-memory-budgets

Conversation

@maksym-mishchenko

Copy link
Copy Markdown
Contributor

WI 3522638 requires a per-execution memory budget to remain attached to one suspendable RVM evaluation across execute, HostAwait, resume, sequential thread migration, and terminal cleanup.

This change keeps one allocation-origin account for the execution lifetime, attributes cross-thread frees and reallocations to that account, and preserves typed budget exhaustion through Rust, FFI status 10, and RegorusMemoryBudgetExceededException. It also covers native resume input parsing and immediate native output/C-string creation while leaving host-await elapsed time, managed host work, sampled profiling, fetch-size limits, and AGS configuration outside this change.

The source is conditionally code-accepted at tree pin 531e9ccc6a408954e78bb773bad28bc6a113b8bea02af02cf86c3cdba451e642, based on 121e638406c081398336dc3b05874d4f31aecbcf. Existing public C ABI and CLR signatures, status ordinals, dependencies, and no-budget behavior remain unchanged.

Dependency-blocked draft — do not merge

  • Producer build/freeze is unadmitted. Proposed resource ceilings are observable, not automatically enforced; no build-specific overshoot-risk contract is approved.
  • Performance acceptance is incomplete. No numeric regression or enabled-overhead criterion is approved.
  • No existing resume-capable HostAwait timing runner or qualified allocation-heavy vector has been identified.
  • No exclusive representative Windows-x64 benchmark window has been confirmed. Benchmark execution remains unadmitted.
  • Platform and package evidence beyond the accepted Windows-x64 scope remains incomplete.

Merge requires current-target verification, admitted producer builds and benchmarks, immutable producer identity, performance and platform evidence meeting an approved acceptance contract, and final technical and runtime-safety review. This draft does not authorize package publication, release, AGS adoption, deployment, configuration rollout or WI completion.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d6592a3a-3255-447c-a539-00a799431708
Comment thread mimalloc/src/mimalloc.rs
Comment thread mimalloc/src/mimalloc.rs
Comment thread mimalloc/src/mimalloc.rs
Comment thread mimalloc/src/mimalloc.rs Fixed
Comment thread mimalloc/src/mimalloc.rs Fixed
Comment thread mimalloc/src/mimalloc.rs Fixed
Comment thread mimalloc/src/mimalloc.rs Fixed
Comment thread mimalloc/src/mimalloc.rs Fixed
Comment thread mimalloc/src/mimalloc.rs Fixed
Comment thread mimalloc/src/mimalloc.rs Fixed
Maksym Mishchenko and others added 3 commits October 8, 2026 14:53
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread src/rvm/vm/machine.rs
Maksym Mishchenko and others added 13 commits October 8, 2026 21:17
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@maksym-mishchenko

Copy link
Copy Markdown
Contributor Author

The returned NULL-pointer paths cross explicit nonnull guards, and both logging reports concern numeric test diagnostics, not payloads or absolute addresses. Please review these four CodeQL reports as potential false positives. This assessment covers only the returned paths, capped at five per pointer finding.

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