484 int MemBaseline::malloc_sort_by_addr(const void* p1, const void* p2) { |
484 int MemBaseline::malloc_sort_by_addr(const void* p1, const void* p2) { |
485 assert(MemTracker::is_on(), "Just check"); |
485 assert(MemTracker::is_on(), "Just check"); |
486 const MemPointerRecord* mp1 = (const MemPointerRecord*)p1; |
486 const MemPointerRecord* mp1 = (const MemPointerRecord*)p1; |
487 const MemPointerRecord* mp2 = (const MemPointerRecord*)p2; |
487 const MemPointerRecord* mp2 = (const MemPointerRecord*)p2; |
488 int delta = UNSIGNED_COMPARE(mp1->addr(), mp2->addr()); |
488 int delta = UNSIGNED_COMPARE(mp1->addr(), mp2->addr()); |
489 assert(delta != 0, "dup pointer"); |
489 assert(p1 == p2 || delta != 0, "dup pointer"); |
490 return delta; |
490 return delta; |
491 } |
491 } |
492 |
492 |