< prev index next >

src/hotspot/share/gc/shared/cardTable.cpp

Print this page
rev 58060 : [mq]: 8238999-iklam-review

*** 49,71 **** _page_size(os::vm_page_size()), _byte_map_size(0), _byte_map(NULL), _byte_map_base(NULL), _cur_covered_regions(0), ! _covered(NEW_C_HEAP_ARRAY(MemRegion, _max_covered_regions, mtGC)), ! _committed(NEW_C_HEAP_ARRAY(MemRegion, _max_covered_regions, mtGC)), _guard_region() { assert((uintptr_t(_whole_heap.start()) & (card_size - 1)) == 0, "heap must start at card boundary"); assert((uintptr_t(_whole_heap.end()) & (card_size - 1)) == 0, "heap must end at card boundary"); assert(card_size <= 512, "card_size must be less than 512"); // why? - - for (int i = 0; i < _max_covered_regions; i++) { - ::new (&_covered[i]) MemRegion(); - ::new (&_committed[i]) MemRegion(); - } } CardTable::~CardTable() { FREE_C_HEAP_ARRAY(MemRegion, _covered); FREE_C_HEAP_ARRAY(MemRegion, _committed); --- 49,66 ---- _page_size(os::vm_page_size()), _byte_map_size(0), _byte_map(NULL), _byte_map_base(NULL), _cur_covered_regions(0), ! _covered(MemRegion::create(_max_covered_regions, mtGC)), ! _committed(MemRegion::create(_max_covered_regions, mtGC)), _guard_region() { assert((uintptr_t(_whole_heap.start()) & (card_size - 1)) == 0, "heap must start at card boundary"); assert((uintptr_t(_whole_heap.end()) & (card_size - 1)) == 0, "heap must end at card boundary"); assert(card_size <= 512, "card_size must be less than 512"); // why? } CardTable::~CardTable() { FREE_C_HEAP_ARRAY(MemRegion, _covered); FREE_C_HEAP_ARRAY(MemRegion, _committed);
< prev index next >