diff --git a/src/hotspot/share/gc/z/zUtils.cpp b/src/hotspot/share/gc/z/zUtils.cpp index 3804baad595..7997242f391 100644 --- a/src/hotspot/share/gc/z/zUtils.cpp +++ b/src/hotspot/share/gc/z/zUtils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ #include "gc/z/zUtils.hpp" #include "runtime/nonJavaThread.hpp" -#include - const char* ZUtils::thread_name() { const Thread* const thread = Thread::current(); if (thread->is_Named_thread()) { @@ -38,5 +36,7 @@ const char* ZUtils::thread_name() { } void ZUtils::fill(uintptr_t* addr, size_t count, uintptr_t value) { - std::fill_n(addr, count, value); + for (size_t i = 0; i < count; ++i) { + addr[i] = value; + } }