Skip to content

Commit 22845a7

Browse files
author
Kim Barrett
committed
8337995: ZUtils::fill uses std::fill_n
Reviewed-by: mli, stefank, jwaters, tschatzl
1 parent f71d515 commit 22845a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/hotspot/share/gc/z/zUtils.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,6 @@
2525
#include "gc/z/zUtils.hpp"
2626
#include "runtime/nonJavaThread.hpp"
2727

28-
#include <algorithm>
29-
3028
const char* ZUtils::thread_name() {
3129
const Thread* const thread = Thread::current();
3230
if (thread->is_Named_thread()) {
@@ -38,5 +36,7 @@ const char* ZUtils::thread_name() {
3836
}
3937

4038
void ZUtils::fill(uintptr_t* addr, size_t count, uintptr_t value) {
41-
std::fill_n(addr, count, value);
39+
for (size_t i = 0; i < count; ++i) {
40+
addr[i] = value;
41+
}
4242
}

0 commit comments

Comments
 (0)