mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-13 20:05:31 +00:00
8337995: ZUtils::fill uses std::fill_n
Reviewed-by: mli, stefank, jwaters, tschatzl
This commit is contained in:
parent
f71d515026
commit
22845a77a2
@ -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 <algorithm>
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user