-
Bug
-
Resolution: Fixed
-
P4
-
hs24, hs25
-
b30
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8013676 | 8 | Zhengyu Gu | P4 | Closed | Fixed | b88 |
David Holmes pointed out that some of NMT classes derive from _ValueObj, but should use VALUE_OBJ_CLASS_SPEC instead.
// Portability note: Certain compilers (e.g. gcc) will
// always make classes bigger if it has a superclass, even
// if the superclass does not have any virtual methods or
// instance fields. The HotSpot implementation relies on this
// not to happen. So never make a ValueObj class a direct subclass
// of this object, but use the VALUE_OBJ_CLASS_SPEC class instead, e.g.,
// like this:
//
// class A VALUE_OBJ_CLASS_SPEC {
// ...
// }
//
// With gcc and possible other compilers the VALUE_OBJ_CLASS_SPEC can
// be defined as a an empty string "".
//
// Portability note: Certain compilers (e.g. gcc) will
// always make classes bigger if it has a superclass, even
// if the superclass does not have any virtual methods or
// instance fields. The HotSpot implementation relies on this
// not to happen. So never make a ValueObj class a direct subclass
// of this object, but use the VALUE_OBJ_CLASS_SPEC class instead, e.g.,
// like this:
//
// class A VALUE_OBJ_CLASS_SPEC {
// ...
// }
//
// With gcc and possible other compilers the VALUE_OBJ_CLASS_SPEC can
// be defined as a an empty string "".
//
- backported by
-
JDK-8013676 NMT: classes should not derive from _ValueObj, use VALUE_OBJ_CLASS_SPEC instead
- Closed