Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/hotspot/share/utilities/copy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ class Copy : AllStatic {
// byte_count is in bytes to check its alignment
assert_params_ok(from, to, HeapWordSize);
assert_byte_count_ok(byte_count, HeapWordSize);
if (byte_count == 0) return;

size_t count = align_up(byte_count, HeapWordSize) >> LogHeapWordSize;
assert(from <= to || to + count <= from, "do not overwrite source data");
Expand Down