Mercurial > hg > graal-compiler
comparison src/share/vm/services/memPtr.hpp @ 6979:fb3190e77d3c
8001592: NMT: assertion failed: assert(_amount >= amt) failed: Just check: memBaseline.hpp:180
Summary: Fixed NMT that miscounted arena memory when it is used as value or stack object.
Reviewed-by: acorn, coleenp
author | zgu |
---|---|
date | Fri, 09 Nov 2012 19:24:31 -0500 |
parents | 69ad7823b1ca |
children | 4102b59539ce |
comparison
equal
deleted
inserted
replaced
6938:8940ddc1036f | 6979:fb3190e77d3c |
---|---|
163 | 163 |
164 inline static bool is_arena_record(MEMFLAGS flags) { | 164 inline static bool is_arena_record(MEMFLAGS flags) { |
165 return (flags & (otArena | tag_size)) == otArena; | 165 return (flags & (otArena | tag_size)) == otArena; |
166 } | 166 } |
167 | 167 |
168 inline static bool is_arena_size_record(MEMFLAGS flags) { | 168 inline static bool is_arena_memory_record(MEMFLAGS flags) { |
169 return (flags & (otArena | tag_size)) == (otArena | tag_size); | 169 return (flags & (otArena | tag_size)) == (otArena | tag_size); |
170 } | 170 } |
171 | 171 |
172 inline static bool is_virtual_memory_record(MEMFLAGS flags) { | 172 inline static bool is_virtual_memory_record(MEMFLAGS flags) { |
173 return (flags & vmBit) != 0; | 173 return (flags & vmBit) != 0; |
254 inline bool is_allocation_record() const { | 254 inline bool is_allocation_record() const { |
255 return is_allocation_record(_flags); | 255 return is_allocation_record(_flags); |
256 } | 256 } |
257 | 257 |
258 // if this record records a size information of an arena | 258 // if this record records a size information of an arena |
259 inline bool is_arena_size_record() const { | 259 inline bool is_arena_memory_record() const { |
260 return is_arena_size_record(_flags); | 260 return is_arena_memory_record(_flags); |
261 } | 261 } |
262 | 262 |
263 // if this pointer represents an address to an arena object | 263 // if this pointer represents an address to an arena object |
264 inline bool is_arena_record() const { | 264 inline bool is_arena_record() const { |
265 return is_arena_record(_flags); | 265 return is_arena_record(_flags); |
266 } | 266 } |
267 | 267 |
268 // if this record represents a size information of specific arena | 268 // if this record represents a size information of specific arena |
269 inline bool is_size_record_of_arena(const MemPointerRecord* arena_rc) { | 269 inline bool is_memory_record_of_arena(const MemPointerRecord* arena_rc) { |
270 assert(is_arena_size_record(), "not size record"); | 270 assert(is_arena_memory_record(), "not size record"); |
271 assert(arena_rc->is_arena_record(), "not arena record"); | 271 assert(arena_rc->is_arena_record(), "not arena record"); |
272 return (arena_rc->addr() + sizeof(void*)) == addr(); | 272 return (arena_rc->addr() + sizeof(void*)) == addr(); |
273 } | 273 } |
274 | 274 |
275 // if this record records a 'free' or virtual memory 'free' call | 275 // if this record records a 'free' or virtual memory 'free' call |