RFR: 8337995: ZUtils::fill uses std::fill_n
Hamlin Li
mli at openjdk.org
Wed Dec 11 09:29:36 UTC 2024
On Tue, 10 Dec 2024 16:37:43 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change to zUtils.cpp to use a for-loop to fill a block of
> memory rather than using the std::fill_n algorithm. Use of <algorithm> is
> currently not permitted in HotSpot.
>
> Testing: mach5 tier1
The code change itself looks good.
Just got one question about the rule, I know a c++ compiler needs to support c++14, as `std::fill_n` is introduced in 17/20/26, so seems we should not use it in hotspot code, is this the reason why we can not use `std::fill_n` here? Or there is a place recording which libaraies/files are allowed or not allowed in hotspot? Thanks!
-------------
PR Review: https://git.openjdk.org/jdk/pull/22667#pullrequestreview-2494895901
More information about the hotspot-gc-dev
mailing list