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

changeset 1900
cc387008223e
parent 1829
1316cec51b4d
child 1905
c9a07413e82b
equal deleted inserted replaced
1878:8bfe9058ca46 1900:cc387008223e
552 return G1OffsetTableContigSpace::allocate(size); 552 return G1OffsetTableContigSpace::allocate(size);
553 } 553 }
554 #endif 554 #endif
555 555
556 void HeapRegion::set_zero_fill_state_work(ZeroFillState zfs) { 556 void HeapRegion::set_zero_fill_state_work(ZeroFillState zfs) {
557 assert(top() == bottom() || zfs == Allocated,
558 "Region must be empty, or we must be setting it to allocated.");
559 assert(ZF_mon->owned_by_self() || 557 assert(ZF_mon->owned_by_self() ||
560 Universe::heap()->is_gc_active(), 558 Universe::heap()->is_gc_active(),
561 "Must hold the lock or be a full GC to modify."); 559 "Must hold the lock or be a full GC to modify.");
560 #ifdef ASSERT
561 if (top() != bottom() && zfs != Allocated) {
562 ResourceMark rm;
563 stringStream region_str;
564 print_on(&region_str);
565 assert(top() == bottom() || zfs == Allocated,
566 err_msg("Region must be empty, or we must be setting it to allocated. "
567 "_zfs=%d, zfs=%d, region: %s", _zfs, zfs, region_str.as_string()));
568 }
569 #endif
562 _zfs = zfs; 570 _zfs = zfs;
563 } 571 }
564 572
565 void HeapRegion::set_zero_fill_complete() { 573 void HeapRegion::set_zero_fill_complete() {
566 set_zero_fill_state_work(ZeroFilled); 574 set_zero_fill_state_work(ZeroFilled);

mercurial