Skip to content

Commit

Permalink
8324838: test_nmt_locationprinting.cpp broken in the gcc windows build
Browse files Browse the repository at this point in the history
Reviewed-by: dholmes, kevinw, jsjolen
  • Loading branch information
TheShermanTanker authored and pull[bot] committed Feb 5, 2024
1 parent b5cfd86 commit 8323242
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 8323242

Please sign in to comment.