8388115: Provide os::vm_min_address() for BSD - #67
Merged
Conversation
tstuefe
approved these changes
Jul 17, 2026
tstuefe
left a comment
There was a problem hiding this comment.
Looks good to me (but I have no official role in the bsd project I think)
snake66
approved these changes
Jul 17, 2026
snake66
left a comment
Collaborator
There was a problem hiding this comment.
Looked at the discussion in the OpenJDK bug issue, and this change makes sense to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.openjdk.org/browse/JDK-8388115 requests implementation of
os::vm_min_address()andos::vm_max_address()for BSD.os::vm_max_address()has not yet been merged into master but I have discussed the current BSD implementation ofos::vm_min_address()with @tstuefe and came up with this change.This PR is for correctness and does not change the return value of
os::vm_min_address()on BSD becauseVM_MIN_ADDRESSis less then_vm_min_address_defaulton FreeBSD, OpenBSD and NetBSD. However, if some future architecture or future change toVM_MIN_ADDRESSmakes it greater then_vm_min_address_default, the jdk is prepared for that change.Of note is that
_vm_min_address_defaultnot only is the default value but also serves as a minimum value the JDK supports. When openjdk#31864 lands in master, I will follow up with BSD implementation ofos::vm_max_address()that usesVM_MAXUSER_ADDRESS.