src/share/vm/services/memSnapshot.cpp

changeset 4641
fc64254f5579
parent 4400
ecd24264898b
child 5053
c18152e0554e
equal deleted inserted replaced
4640:b6d5b3e50379 4641:fc64254f5579
526 // a deallocation record 526 // a deallocation record
527 assert(new_rec->is_deallocation_record(), "Sanity check"); 527 assert(new_rec->is_deallocation_record(), "Sanity check");
528 // an arena record can be followed by a size record, we need to remove both 528 // an arena record can be followed by a size record, we need to remove both
529 if (matched_rec->is_arena_record()) { 529 if (matched_rec->is_arena_record()) {
530 MemPointerRecord* next = (MemPointerRecord*)malloc_snapshot_itr.peek_next(); 530 MemPointerRecord* next = (MemPointerRecord*)malloc_snapshot_itr.peek_next();
531 if (next->is_arena_memory_record() && next->is_memory_record_of_arena(matched_rec)) { 531 if (next != NULL && next->is_arena_memory_record() &&
532 next->is_memory_record_of_arena(matched_rec)) {
532 malloc_snapshot_itr.remove(); 533 malloc_snapshot_itr.remove();
533 } 534 }
534 } 535 }
535 // the memory is deallocated, remove related record(s) 536 // the memory is deallocated, remove related record(s)
536 malloc_snapshot_itr.remove(); 537 malloc_snapshot_itr.remove();

mercurial