From a1c0e13b35d486d8d6b42aff88e45dcffb8b23e5 Mon Sep 17 00:00:00 2001 From: MBaesken Date: Mon, 27 May 2024 14:03:53 +0200 Subject: [PATCH] JDK-8332955 --- src/hotspot/share/memory/metaspace/runningCounters.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hotspot/share/memory/metaspace/runningCounters.cpp b/src/hotspot/share/memory/metaspace/runningCounters.cpp index 08dffc5c64c52..e3ffbb92e3cc3 100644 --- a/src/hotspot/share/memory/metaspace/runningCounters.cpp +++ b/src/hotspot/share/memory/metaspace/runningCounters.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2020 SAP SE. All rights reserved. + * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2024 SAP SE. 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 @@ -45,7 +45,8 @@ size_t RunningCounters::reserved_words_class() { } size_t RunningCounters::reserved_words_nonclass() { - return VirtualSpaceList::vslist_nonclass()->reserved_words(); + VirtualSpaceList* vs = VirtualSpaceList::vslist_nonclass(); + return vs != nullptr ? vs->reserved_words() : 0; } // Return total committed size, in words, for Metaspace