Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Options Minimum JVM Maximum HeapSize #13836

Open
wants to merge 14 commits into
base: release-3.7
Choose a base branch
from

Conversation

riverwanderer
Copy link
Collaborator

@riverwanderer riverwanderer commented Feb 11, 2025

First pass at a solution to allow module designers to head off predictable out-of-memory issues. Addresses #13321, #11712 & #9012 (later with a broader request and an alternative implementation idea).

This PR allows a JVM module minimum to be specified on the Global Options panel.
At module startup, when GlobalOptions.java initialises the General tab, it will overwrite JVM maximum heap with the module value if it is higher. If this happens, a warning is posted to the chat log:
e.g.
image
Since it overwrites the value, there is transparency to the user and the rest of the JVM max heap logic works as before.

In addition, for clarity in diagnostics, the actual JVM maximum heap size is logged to the error log at start up.

Vassal release note: This change does seem to be backward compatible, with the proviso that the setting will be lost (of course) if the module developer subsequently edits their module in an earlier 3.7.x version, something which would be entirely avoidable.

@riverwanderer riverwanderer added the enhancement New feature or request label Feb 11, 2025
@riverwanderer riverwanderer added this to the 3.7.16 milestone Feb 11, 2025
@riverwanderer riverwanderer self-assigned this Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Ready for Review Ready to be reviewed for Merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant