From 922cbbc3c97001177c908707a6063d2951eeb1e8 Mon Sep 17 00:00:00 2001 From: tstuefe Date: Tue, 8 Feb 2022 09:02:50 +0100 Subject: [PATCH 1/2] remove ObjMon new and delete --- src/hotspot/share/runtime/objectMonitor.cpp | 13 ------------- src/hotspot/share/runtime/objectMonitor.hpp | 5 ----- 2 files changed, 18 deletions(-) diff --git a/src/hotspot/share/runtime/objectMonitor.cpp b/src/hotspot/share/runtime/objectMonitor.cpp index e56b18a84c933..be8b5e8c30067 100644 --- a/src/hotspot/share/runtime/objectMonitor.cpp +++ b/src/hotspot/share/runtime/objectMonitor.cpp @@ -233,19 +233,6 @@ OopStorage* ObjectMonitor::_oop_storage = NULL; // * See also http://blogs.sun.com/dave -void* ObjectMonitor::operator new (size_t size) throw() { - return AllocateHeap(size, mtInternal); -} -void* ObjectMonitor::operator new[] (size_t size) throw() { - return operator new (size); -} -void ObjectMonitor::operator delete(void* p) { - FreeHeap(p); -} -void ObjectMonitor::operator delete[] (void *p) { - operator delete(p); -} - // Check that object() and set_object() are called from the right context: static void check_object_context() { #ifdef ASSERT diff --git a/src/hotspot/share/runtime/objectMonitor.hpp b/src/hotspot/share/runtime/objectMonitor.hpp index 4f85c429b708f..703ffd8c4a4d6 100644 --- a/src/hotspot/share/runtime/objectMonitor.hpp +++ b/src/hotspot/share/runtime/objectMonitor.hpp @@ -203,11 +203,6 @@ class ObjectMonitor : public CHeapObj { static int Knob_SpinLimit; - void* operator new (size_t size) throw(); - void* operator new[] (size_t size) throw(); - void operator delete(void* p); - void operator delete[] (void* p); - // TODO-FIXME: the "offset" routines should return a type of off_t instead of int ... // ByteSize would also be an appropriate type. static int header_offset_in_bytes() { return offset_of(ObjectMonitor, _header); } From 17efee081ff5808c71a600b5bc44d3e705b2ee92 Mon Sep 17 00:00:00 2001 From: tstuefe Date: Tue, 8 Feb 2022 13:02:29 +0100 Subject: [PATCH 2/2] update copyright --- src/hotspot/share/runtime/objectMonitor.cpp | 2 +- src/hotspot/share/runtime/objectMonitor.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/runtime/objectMonitor.cpp b/src/hotspot/share/runtime/objectMonitor.cpp index be8b5e8c30067..a6e279cfcb2ab 100644 --- a/src/hotspot/share/runtime/objectMonitor.cpp +++ b/src/hotspot/share/runtime/objectMonitor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, 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 diff --git a/src/hotspot/share/runtime/objectMonitor.hpp b/src/hotspot/share/runtime/objectMonitor.hpp index 703ffd8c4a4d6..4ca4cc28c8662 100644 --- a/src/hotspot/share/runtime/objectMonitor.hpp +++ b/src/hotspot/share/runtime/objectMonitor.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, 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