-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[23.1] Backport: [GR-49300] Break the initialization cycle in NIO/cgroups code #7574
[23.1] Backport: [GR-49300] Break the initialization cycle in NIO/cgroups code #7574
Conversation
substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/heap/PhysicalMemory.java
Outdated
Show resolved
Hide resolved
9a77c83
to
285747b
Compare
Not sure why ecj compilation fails with this, but not in the original PR. |
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.
LGTM.
@ezzarghili Any update on this? Thanks! |
@zakkak Could you please fix the checkstyle issue?
|
First, we use a separate accessor for page-alignedness as it doesn't need the more sophisticated initialization of the directMemory field. Next, ensure PhysicalMemory initialization is serialized and when it is, set directMemory to a static value so that the container code can finish initialization without introducing a cyle. The final directMemory value based on the heap size is then published to JDK code by setting the VM init level to 1. Therefore, application code would use the non-static value as the upper bound. Closes: oracle#556 (cherry picked from commit 1ae2dc0)
(cherry picked from commit 318f108)
…ore thread-safe way. (cherry picked from commit af74d9f)
…#MAX_MEMORY. (cherry picked from commit a606940)
285747b
to
1d2c7c1
Compare
Done |
Hi @ezzarghili, this is a kind reminder. |
This was already backported to 23.1 internally on GR-49328 |
Backport of #7553
Conflicts were trivially resolved by accepting the new changes over the old ones.
@jerboaa can you please review?