RFR 8231146: Heap object size
joe.darcy at oracle.com
Thu Sep 19 18:18:08 UTC 2019
I recommend hosting this functionality in a jdk.* module.
On 9/19/2019 10:35 AM, Roger Riggs wrote:
> Hi Remi,
> In j.u.Objects it will be more likely to be given the challenge it
> to be promoted in the long run.
> With inline classes there are lots of different sizes depending on the
> inline array elements, embedded in another inline, embedded in a
> reference type,
> with or without padding, and depending on compressed oops or not, and
> other implementation
> specific conditions. So a single method isn't going to fill the need.
> Regardless, it needs more thought about what it means.
> Thanks, Roger
> On 9/19/19 12:56 PM, Remi Forax wrote:
>> Hi Roger,
>> why not using sun.misc.Unsafe instead of j.u.Objects ?
>> ----- Mail original -----
>>> De: "Roger Riggs" <Roger.Riggs at oracle.com>
>>> À: "valhalla-dev" <valhalla-dev at openjdk.java.net>
>>> Envoyé: Mardi 17 Septembre 2019 22:00:57
>>> Objet: RFR 8231146: Heap object size
>>> Please review and comment:
>>> This request adds a (probably temporary) API to return the heap size of
>>> an object.
>>> In prototyping with inline classes it will be useful to know an
>>> approximation of the size of an object in the heap while prototyping
>>> various tradoffs in performance and data structures.
>>> Thanks, Roger
More information about the valhalla-dev