src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

changeset 1824
5dbd9300cf9c
parent 1823
7666957bc44d
child 1825
f9ec1e4bbb44
equal deleted inserted replaced
1823:7666957bc44d 1824:5dbd9300cf9c
2192 void do_object(oop o) { 2192 void do_object(oop o) {
2193 VerifyLivenessOopClosure isLive(_g1h); 2193 VerifyLivenessOopClosure isLive(_g1h);
2194 assert(o != NULL, "Huh?"); 2194 assert(o != NULL, "Huh?");
2195 if (!_g1h->is_obj_dead_cond(o, _use_prev_marking)) { 2195 if (!_g1h->is_obj_dead_cond(o, _use_prev_marking)) {
2196 o->oop_iterate(&isLive); 2196 o->oop_iterate(&isLive);
2197 if (!_hr->obj_allocated_since_prev_marking(o)) 2197 if (!_hr->obj_allocated_since_prev_marking(o)) {
2198 _live_bytes += (o->size() * HeapWordSize); 2198 size_t obj_size = o->size(); // Make sure we don't overflow
2199 _live_bytes += (obj_size * HeapWordSize);
2200 }
2199 } 2201 }
2200 } 2202 }
2201 size_t live_bytes() { return _live_bytes; } 2203 size_t live_bytes() { return _live_bytes; }
2202 }; 2204 };
2203 2205

mercurial