-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
b30
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8269978 | 18 | Mandy Chung | P3 | Resolved | Fixed | b06 |
JDK-8270716 | 17.0.1 | Mandy Chung | P3 | Resolved | Fixed | b03 |
This is a follow up to CSR JDK-8224760
Here are few comments after reading "java.lang.ref" spec:
https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/ref/package-summary.html
#1 The first sentence in the package is "Provides reference-object classes, which support a limited degree of interaction with the garbage collector." Looks not perfectly correct for every GC - degree of interaction might be limited down to zero.
#2 "Post-mortem cleanup actions can be registered and managed by a Cleaner". For some GCs there are no post-mortem cleanup actions possible as there's no post-portem. Everyone is immortal.
#3 "A program may request to be notified of changes in an object's reachability". With some GCs it is never notified.
#4 "Some time after the garbage collector determines that the reachability of the referent has changed to the value corresponding to the type of the reference, it will clear the reference and add it to the associated queue". Not the case with some extreme GCs - one might be never capable and never would try to determine this and update the associated queue.
Here are few comments after reading "java.lang.ref" spec:
https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/ref/package-summary.html
#1 The first sentence in the package is "Provides reference-object classes, which support a limited degree of interaction with the garbage collector." Looks not perfectly correct for every GC - degree of interaction might be limited down to zero.
#2 "Post-mortem cleanup actions can be registered and managed by a Cleaner". For some GCs there are no post-mortem cleanup actions possible as there's no post-portem. Everyone is immortal.
#3 "A program may request to be notified of changes in an object's reachability". With some GCs it is never notified.
#4 "Some time after the garbage collector determines that the reachability of the referent has changed to the value corresponding to the type of the reference, it will clear the reference and add it to the associated queue". Not the case with some extreme GCs - one might be never capable and never would try to determine this and update the associated queue.
- backported by
-
JDK-8269978 Clarify the behavior of System::gc w.r.t. reference processing
-
- Resolved
-
-
JDK-8270716 Clarify the behavior of System::gc w.r.t. reference processing
-
- Resolved
-
- csr for
-
JDK-8269690 Clarify the behavior of System::gc w.r.t. java.lang.ref.Reference objects
-
- Closed
-
- relates to
-
JDK-8224760 Enhancing j.l.Runtime/System::gc specification with an explicit 'no guarantee' statement
-
- Closed
-
(1 links to)