src/hotspot/share/gc/shared/generationCounters.cpp
changeset 58084 cddef3bde924
parent 48157 7c4d43c26352
equal deleted inserted replaced
58083:9046db64ca39 58084:cddef3bde924
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    78   : _virtual_space(NULL) {
    78   : _virtual_space(NULL) {
    79   initialize(name, ordinal, spaces, min_capacity, max_capacity, curr_capacity);
    79   initialize(name, ordinal, spaces, min_capacity, max_capacity, curr_capacity);
    80 }
    80 }
    81 
    81 
    82 GenerationCounters::~GenerationCounters() {
    82 GenerationCounters::~GenerationCounters() {
    83   if (_name_space != NULL) {
    83   FREE_C_HEAP_ARRAY(char, _name_space);
    84     FREE_C_HEAP_ARRAY(char, _name_space);
       
    85   }
       
    86 }
    84 }
    87 
    85 
    88 void GenerationCounters::update_all() {
    86 void GenerationCounters::update_all() {
    89   assert(_virtual_space != NULL, "otherwise, override this method");
    87   assert(_virtual_space != NULL, "otherwise, override this method");
    90   _current_size->set_value(_virtual_space->committed_size());
    88   _current_size->set_value(_virtual_space->committed_size());