News

Although Java lacks a true sizeof () equivalent, the Instrumentation interface introduced with J2SE5 can be used to get an estimate of the size of a particular object via its getObjectSize (Object ...
This approach, called "object monitor tables", was implemented in JDK 22 and is activated by a new switch UseObjectMonitorTable that is on by default. Compact object headers rely upon this mechanism.