src/share/vm/services/memPtr.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/services/memPtr.hpp Wed Oct 31 11:57:28 2012
--- new/src/share/vm/services/memPtr.hpp Wed Oct 31 11:57:26 2012
*** 297,318 ****
--- 297,329 ----
inline bool is_same_region(const MemPointerRecord* other) const {
return (addr() == other->addr() && size() == other->size());
}
// if this memory region fully contains another one
! inline bool contains_region(const MemPointerRecord* other) const {
! return contains_region(other->addr(), other->size());
! inline bool contain_region(const MemPointerRecord* other) const {
! return contain_region(other->addr(), other->size());
}
// if this memory region fully contains specified memory range
! inline bool contains_region(address add, size_t sz) const {
! inline bool contain_region(address add, size_t sz) const {
return (addr() <= add && addr() + size() >= add + sz);
}
! inline bool contains_address(address add) const {
! inline bool contain_address(address add) const {
return (addr() <= add && addr() + size() > add);
}
+
+ // if this memory region overlaps another region
+ inline bool overlap_region(const MemPointerRecord* other) const {
+ assert(other != NULL, "Just check");
+ assert(size() > 0 && other->size() > 0, "empty range");
+ return contain_address(other->addr()) ||
+ contain_address(other->addr() + other->size() - 1) || // exclude end address
+ other->contain_address(addr()) ||
+ other->contain_address(addr() + size() - 1); // exclude end address
+ }
+
};
// MemPointerRecordEx also records callsite pc, from where
// the memory block is allocated
class MemPointerRecordEx : public MemPointerRecord {
src/share/vm/services/memPtr.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File