comparison src/share/vm/services/mallocTracker.hpp @ 20366:dd3939fe8424

8054546: NMT2 leaks memory Summary: Fixed memory leak in NMT by baselining memory in c heap instead of an arena. Reviewed-by: coleenp, minqi
author zgu
date Wed, 20 Aug 2014 08:41:15 -0400
parents 833b0f92429a
children 417e3b8d04c5
comparison
equal deleted inserted replaced
20365:3adc0e278f49 20366:dd3939fe8424
169 // Total malloc'd memory amount 169 // Total malloc'd memory amount
170 size_t total() const; 170 size_t total() const;
171 // Total malloc'd memory used by arenas 171 // Total malloc'd memory used by arenas
172 size_t total_arena() const; 172 size_t total_arena() const;
173 173
174 inline size_t thread_count() { 174 inline size_t thread_count() const {
175 return by_type(mtThreadStack)->malloc_count(); 175 MallocMemorySnapshot* s = const_cast<MallocMemorySnapshot*>(this);
176 return s->by_type(mtThreadStack)->malloc_count();
176 } 177 }
177 178
178 void reset(); 179 void reset();
179 180
180 void copy_to(MallocMemorySnapshot* s) { 181 void copy_to(MallocMemorySnapshot* s) {