-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8333886: Explicitly specify that asSlice and reinterpret return a memory segment backed by the same region of memory. #19633
Conversation
👋 Welcome back pminborg! A progress list of the required criteria for merging this PR into |
@minborg This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 24 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
The term 'subset' doesn't feel right to me here, since we're only talking about a single memory region (not a set of memory regions). I suggest 'sub-region' instead. |
Actually, nvm, that doesn't work for |
In my opinion, any 'sub' terminology is misleading since, as you pointed out, one can (and often will) Using 'subset' for |
If a segment is reinterpreted to be larger than If a segment is reinterpreted to be smaller than So, strictly the proposed text is correct. The proposition "The returned memory segment is backed by the same region of memory that backs this memory segment" appears to be incorrect if a smaller chunk is carved out? Maybe something more neutral like "The returned memory segment shares a region of backing memory with this segment"? Adding text similar to "No memory will be allocated or deallocated" sounds like a good idea. |
Another way to think about this is: a segment's backing region can be larger or smaller than the bounds specified by the segment itself. Though, in most cases they are the same. For example, If we allocate 10 bytes of memory in native code, and return it to the Java side, I'd argue that the backing region of the memory segment we get back is still 10 bytes in size, even though the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version looks good to me.
/integrate |
Going to push as commit c80e2eb.
Your commit was automatically rebased without conflicts. |
This PR proposes to explicitly state that returned segments form the
asSlice
andreinterpret
method share memory regions withthis
memory segment.Note: The term "subset" means a true subset or the same set.
Progress
Warning
8333886: Explicitly specify that asSlice and reinterpret return a memory segment backed by the same region of memory.
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19633/head:pull/19633
$ git checkout pull/19633
Update a local copy of the PR:
$ git checkout pull/19633
$ git pull https://git.openjdk.org/jdk.git pull/19633/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19633
View PR using the GUI difftool:
$ git pr show -t 19633
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19633.diff
Webrev
Link to Webrev Comment