comparison src/share/vm/services/memPtr.hpp @ 6937:69ad7823b1ca

8001591: NMT: assertion failed: assert(rec->addr() + rec->size() <= cur->base()) failed: Can not overlap in memSnapshot.cpp Summary: NMT should allow overlapping committed regions as long as they belong to the same reserved region Reviewed-by: dholmes, coleenp
author zgu
date Mon, 05 Nov 2012 15:30:22 -0500
parents 716c64bda5ba
children fb3190e77d3c
comparison
equal deleted inserted replaced
6917:e81fbc04a942 6937:69ad7823b1ca
309 } 309 }
310 310
311 inline bool contains_address(address add) const { 311 inline bool contains_address(address add) const {
312 return (addr() <= add && addr() + size() > add); 312 return (addr() <= add && addr() + size() > add);
313 } 313 }
314
315 // if this memory region overlaps another region
316 inline bool overlaps_region(const MemPointerRecord* other) const {
317 assert(other != NULL, "Just check");
318 assert(size() > 0 && other->size() > 0, "empty range");
319 return contains_address(other->addr()) ||
320 contains_address(other->addr() + other->size() - 1) || // exclude end address
321 other->contains_address(addr()) ||
322 other->contains_address(addr() + size() - 1); // exclude end address
323 }
324
314 }; 325 };
315 326
316 // MemPointerRecordEx also records callsite pc, from where 327 // MemPointerRecordEx also records callsite pc, from where
317 // the memory block is allocated 328 // the memory block is allocated
318 class MemPointerRecordEx : public MemPointerRecord { 329 class MemPointerRecordEx : public MemPointerRecord {