mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8059100: SIGSEGV VirtualMemoryTracker::remove_released_region
Disallow increasing native memory tracking level Reviewed-by: hseigel, ctornqvi, gtriantafill
This commit is contained in:
parent
fe03f41db8
commit
3a86f9cd27
12 changed files with 134 additions and 119 deletions
|
@ -51,14 +51,6 @@ size_t MallocMemorySnapshot::total_arena() const {
|
|||
return amount;
|
||||
}
|
||||
|
||||
|
||||
void MallocMemorySnapshot::reset() {
|
||||
_tracking_header.reset();
|
||||
for (int index = 0; index < mt_number_of_types; index ++) {
|
||||
_malloc[index].reset();
|
||||
}
|
||||
}
|
||||
|
||||
// Make adjustment by subtracting chunks used by arenas
|
||||
// from total chunks to get total free chunck size
|
||||
void MallocMemorySnapshot::make_adjustment() {
|
||||
|
@ -116,14 +108,9 @@ bool MallocTracker::initialize(NMT_TrackingLevel level) {
|
|||
bool MallocTracker::transition(NMT_TrackingLevel from, NMT_TrackingLevel to) {
|
||||
assert(from != NMT_off, "Can not transition from off state");
|
||||
assert(to != NMT_off, "Can not transition to off state");
|
||||
if (from == NMT_minimal) {
|
||||
MallocMemorySummary::reset();
|
||||
}
|
||||
assert (from != NMT_minimal, "cannot transition from minimal state");
|
||||
|
||||
if (to == NMT_detail) {
|
||||
assert(from == NMT_minimal || from == NMT_summary, "Just check");
|
||||
return MallocSiteTable::initialize();
|
||||
} else if (from == NMT_detail) {
|
||||
if (from == NMT_detail) {
|
||||
assert(to == NMT_minimal || to == NMT_summary, "Just check");
|
||||
MallocSiteTable::shutdown();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue