RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

Alan Bateman alanb at openjdk.org
Tue Jul 25 05:54:41 UTC 2023


On Tue, 25 Jul 2023 02:09:29 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> It's based on micro-benchmarks. Having the loops in Java reduces throughput but allocating memory using `malloc(len)` also reduces throughput as `len` gets larger and this threshold appears to balance the two.

Are these micro benchmarks dropping the file system cache so there is real file I/O? I wasn't expecting to see a buffer larger than 1Mb so curious what the benchmarks say.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14981#discussion_r1273028051


More information about the security-dev mailing list