Skip to content

Conversation

@BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Aug 21, 2025

Free malloc-ed data that is no longer used after method execution. This might amount to a few MBs on very heavy apps.

Free malloc-ed data that is no longer used after method execution.
Copilot AI review requested due to automatic review settings August 21, 2025 10:12
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 21, 2025
Copy link
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 fixes memory leaks in the Mono AOT (Ahead-of-Time compilation) gsharedvt implementation by adding proper cleanup of malloc-ed data. The changes ensure that dynamically allocated memory is freed after method execution, potentially saving several megabytes in memory-intensive applications.

Key changes:

  • Added g_free() calls to release allocated memory that was previously leaked
  • Fixed cleanup of dst, caller_cinfo, and callee_cinfo variables

@BrzVlad BrzVlad added area-Codegen-AOT-mono and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Aug 25, 2025
@BrzVlad BrzVlad merged commit b39bd80 into dotnet:main Aug 25, 2025
71 checks passed
@BrzVlad
Copy link
Member Author

BrzVlad commented Aug 25, 2025

/backport to release/10.0

@github-actions
Copy link
Contributor

@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants