mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8146523: VirtualMemoryTracker::remove_released_region double count unmapped CDS shared memory
Skip tracking release for unmapped CDS shared space. Reviewed-by: dholmes, coleenp, iklam, gtriantafill
This commit is contained in:
parent
ee04eabcd1
commit
50bcef8c75
1 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -416,6 +416,14 @@ bool VirtualMemoryTracker::remove_released_region(address addr, size_t size) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (reserved_rgn->flag() == mtClassShared &&
|
||||||
|
reserved_rgn->contain_region(addr, size) &&
|
||||||
|
!reserved_rgn->same_region(addr, size)) {
|
||||||
|
// This is an unmapped CDS region, which is part of the reserved shared
|
||||||
|
// memory region.
|
||||||
|
// See special handling in VirtualMemoryTracker::add_reserved_region also.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
VirtualMemorySummary::record_released_memory(size, reserved_rgn->flag());
|
VirtualMemorySummary::record_released_memory(size, reserved_rgn->flag());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue