Skip to content

Add configurable JVM memory settings for jdtls#238

Merged
tartarughina merged 3 commits intozed-extensions:mainfrom
tartarughina:min-max-memory
May 5, 2026
Merged

Add configurable JVM memory settings for jdtls#238
tartarughina merged 3 commits intozed-extensions:mainfrom
tartarughina:min-max-memory

Conversation

@tartarughina
Copy link
Copy Markdown
Collaborator

Add get_max_memory and get_min_memory config functions to read heap size settings. Implement parse_memory_value to convert JVM memory strings (e.g. "2G", "512m") to bytes. Update launch args to use configured values with validation to ensure min doesn't exceed max, defaulting to "1G" for initial heap.

Address #234

Add `get_max_memory` and `get_min_memory` config functions to read
heap size settings. Implement `parse_memory_value` to convert JVM
memory strings (e.g. "2G", "512m") to bytes. Update launch args to
use configured values with validation to ensure min doesn't exceed
max, defaulting to "1G" for initial heap.
@tartarughina tartarughina requested a review from playdohface May 5, 2026 16:36
@cla-bot cla-bot Bot added the cla-signed label May 5, 2026
Copy link
Copy Markdown
Collaborator

@playdohface playdohface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this helps a little bit, but I reckon it'll just allow changing the behavior from eating all the RAM to crashing JDTLS for the affected users. We should try to recreate the issue and properly triage it at some point, JDTLS is probably partly at fault here.

@tartarughina
Copy link
Copy Markdown
Collaborator Author

I agree, not a solution to the issues you mentioned but rather a customization that for systems with hardware limitations could represent a nice to have.

@tartarughina tartarughina merged commit 93771eb into zed-extensions:main May 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants