From 832324296f8b1f8838e9c1e263dd7e5bd550b444 Mon Sep 17 00:00:00 2001 From: Julian Waters Date: Thu, 1 Feb 2024 05:54:57 +0000 Subject: [PATCH] 8324838: test_nmt_locationprinting.cpp broken in the gcc windows build Reviewed-by: dholmes, kevinw, jsjolen --- test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp b/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp index cafeeb424f0a7..aeb5144eeed9b 100644 --- a/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp +++ b/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2023, Red Hat, Inc. and/or its affiliates. - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 @@ -64,6 +64,7 @@ static void test_for_live_c_heap_block(size_t sz, ssize_t offset) { FREE_C_HEAP_ARRAY(char, c); } +#ifdef LINUX static void test_for_dead_c_heap_block(size_t sz, ssize_t offset) { if (!MemTracker::enabled()) { return; @@ -89,6 +90,7 @@ static void test_for_dead_c_heap_block(size_t sz, ssize_t offset) { hdr->revive(); FREE_C_HEAP_ARRAY(char, c); } +#endif TEST_VM(NMT, location_printing_cheap_live_1) { test_for_live_c_heap_block(2 * K, 0); } // start of payload TEST_VM(NMT, location_printing_cheap_live_2) { test_for_live_c_heap_block(2 * K, -7); } // into header