On Tue, 6 Jan 2026 10:34:27 GMT, David Beaumont <[email protected]> wrote:
>> I can't, I've never seen this code before. No comments, no tests for why 4k >> is a good size. Probably just a "page size" heuristic. I'm just removing >> dead code and moving what's not dead out of the class to be deleted. >> >> Changing details beyond that should probably be a different PR. > > Actually, thinking about this more, it would have the benefit (in the > situation where caching happens) of making buckets more likely to be > reususeable, so if we're willing to assume that, and since the cache is going > away, we could justify dropping the rounding and just allocating the exact > size. I can't see any reason to round up now so I think we should remove it. I don't mind if its this PR or a separate PR. I'm interested to know if this can be changed to use allocate as it doesn't need a direct buffer here. FileChannel.read uses the thread-local buffer cache when called with a heap-buffer. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29043#discussion_r2664493810
