src/share/vm/gc_implementation/shared/spaceCounters.hpp

changeset 3900
d2a62e0f25eb
parent 2314
f95d63e2154a
child 4153
b9a9ed0f8eeb
equal deleted inserted replaced
3877:74533f63b116 3900:d2a62e0f25eb
33 #endif 33 #endif
34 34
35 // A SpaceCounter is a holder class for performance counters 35 // A SpaceCounter is a holder class for performance counters
36 // that track a space; 36 // that track a space;
37 37
38 class SpaceCounters: public CHeapObj { 38 class SpaceCounters: public CHeapObj<mtGC> {
39 friend class VMStructs; 39 friend class VMStructs;
40 40
41 private: 41 private:
42 PerfVariable* _capacity; 42 PerfVariable* _capacity;
43 PerfVariable* _used; 43 PerfVariable* _used;
53 53
54 SpaceCounters(const char* name, int ordinal, size_t max_size, 54 SpaceCounters(const char* name, int ordinal, size_t max_size,
55 MutableSpace* m, GenerationCounters* gc); 55 MutableSpace* m, GenerationCounters* gc);
56 56
57 ~SpaceCounters() { 57 ~SpaceCounters() {
58 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); 58 if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtGC);
59 } 59 }
60 60
61 inline void update_capacity() { 61 inline void update_capacity() {
62 _capacity->set_value(_object_space->capacity_in_bytes()); 62 _capacity->set_value(_object_space->capacity_in_bytes());
63 } 63 }

mercurial