On Sat, 30 Dec 2023 17:43:25 GMT, Vladimir Sitnikov <vsitni...@openjdk.org> 
wrote:

>> I assume you mean "to make it a blackbox"? Actually I do not see how we 
>> could do that *reliably*, as I already wrote recently.
>
> `com.sun.management.ThreadMXBean#getCurrentThreadAllocatedBytes` is reliable, 
> isn't it?

According to its JavaDocs it only returns *an approximation*, whatever that 
means. And it is measuring memory, while I already explained that the aim of 
this PR IMHO is not to spare memory, but to spare *time*. I wonder why we do 
not simply merge this PR as-is to get the actual benefits integrated ASAP 
instead of holding the train by heating up this discussion again?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16879#discussion_r1438669194

Reply via email to