mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8210321: Create NO_KEEPALIVE CLD holder accessor
Reviewed-by: coleenp, kbarrett
This commit is contained in:
parent
842bc09b01
commit
c8be228513
3 changed files with 12 additions and 2 deletions
|
@ -671,6 +671,15 @@ oop ClassLoaderData::holder_phantom() const {
|
|||
}
|
||||
}
|
||||
|
||||
// Let the GC read the holder without keeping it alive.
|
||||
oop ClassLoaderData::holder_no_keepalive() const {
|
||||
if (!_holder.is_null()) { // NULL class_loader
|
||||
return _holder.peek();
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Unloading support
|
||||
bool ClassLoaderData::is_alive() const {
|
||||
bool alive = keep_alive() // null class loader and incomplete unsafe anonymous klasses.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue