Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

PR can be reviewed commit-by-commit.

  • Removed the Java heap allocation from AbstractCollectionPolicy.updateSizeParameters(). This makes it possible to call System.gc() from code that must be allocation free (was previously only possible for certain GC policies).
    • Native memory is now used instead of Java heap memory (see RawSizeParameters).
    • This native memory may only be accessed from @Uninterruptible code (see SizeParameters)
    • The native memory is freed after a GC or during VM teardown.
  • Moved more heap-size-related values from AbstractCollectionPolicy to SizeParameters to ensure that they are updated atomically as well. Methods like AbstractCollectionPolicy.getMaximumEdenSize() noew return consistent values, even if the heap size changes concurrently.
  • Optimized the allocation slowpath so that we only recompute the GC policy sizes if needed.
  • Changed AbstractCollectionPolicy so that it uses the IsolateArgumentParser values. This fixes issues where wrong heap size values were used before the first garbage collection.
  • Changed heap-size-related onValueUpdate() methods to ensure that the IsolateArgumentParser sees the latest option values as well.
  • Fixed issues with missing GC notifications (OptionKey.afterValueUpdate() wasn't called correctly).
  • Minor code cleanups.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 19, 2025
@graalvmbot graalvmbot merged commit bcd6019 into master Dec 19, 2025
13 checks passed
@graalvmbot graalvmbot deleted the chaeubl/GR-71654 branch December 19, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants