mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-10 21:50:07 +00:00
8281450: Remove unnecessary operator new and delete from ObjectMonitor
Reviewed-by: dholmes
This commit is contained in:
parent
f5d8cebbb6
commit
83d67452da
@ -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
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
@ -203,11 +203,6 @@ class ObjectMonitor : public CHeapObj<mtInternal> {
|
||||
|
||||
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); }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user