RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v18]
Markus KARG
duke at openjdk.org
Sat Dec 30 17:55:46 UTC 2023
On Sat, 30 Dec 2023 17:43:25 GMT, Vladimir Sitnikov <vsitnikov at 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
More information about the core-libs-dev
mailing list