Skip to content

Commit 8353597

Browse files
TheShermanTankerpull[bot]
authored andcommitted
8324838: test_nmt_locationprinting.cpp broken in the gcc windows build
Reviewed-by: dholmes, kevinw, jsjolen
1 parent 02eb669 commit 8353597

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2023, Red Hat, Inc. and/or its affiliates.
3-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -64,6 +64,7 @@ static void test_for_live_c_heap_block(size_t sz, ssize_t offset) {
6464
FREE_C_HEAP_ARRAY(char, c);
6565
}
6666

67+
#ifdef LINUX
6768
static void test_for_dead_c_heap_block(size_t sz, ssize_t offset) {
6869
if (!MemTracker::enabled()) {
6970
return;
@@ -89,6 +90,7 @@ static void test_for_dead_c_heap_block(size_t sz, ssize_t offset) {
8990
hdr->revive();
9091
FREE_C_HEAP_ARRAY(char, c);
9192
}
93+
#endif
9294

9395
TEST_VM(NMT, location_printing_cheap_live_1) { test_for_live_c_heap_block(2 * K, 0); } // start of payload
9496
TEST_VM(NMT, location_printing_cheap_live_2) { test_for_live_c_heap_block(2 * K, -7); } // into header

0 commit comments

Comments
 (0)