src/share/vm/memory/cardTableModRefBS.cpp

changeset 1526
6aa7255741f3
parent 1375
8624da129f0b
child 1907
c18cbe5936b8
     1.1 --- a/src/share/vm/memory/cardTableModRefBS.cpp	Tue Nov 24 15:19:30 2009 -0800
     1.2 +++ b/src/share/vm/memory/cardTableModRefBS.cpp	Thu Dec 03 15:01:57 2009 -0800
     1.3 @@ -511,6 +511,8 @@
     1.4  }
     1.5  
     1.6  void CardTableModRefBS::dirty_MemRegion(MemRegion mr) {
     1.7 +  assert((HeapWord*)align_size_down((uintptr_t)mr.start(), HeapWordSize) == mr.start(), "Unaligned start");
     1.8 +  assert((HeapWord*)align_size_up  ((uintptr_t)mr.end(),   HeapWordSize) == mr.end(),   "Unaligned end"  );
     1.9    jbyte* cur  = byte_for(mr.start());
    1.10    jbyte* last = byte_after(mr.last());
    1.11    while (cur < last) {
    1.12 @@ -520,6 +522,8 @@
    1.13  }
    1.14  
    1.15  void CardTableModRefBS::invalidate(MemRegion mr, bool whole_heap) {
    1.16 +  assert((HeapWord*)align_size_down((uintptr_t)mr.start(), HeapWordSize) == mr.start(), "Unaligned start");
    1.17 +  assert((HeapWord*)align_size_up  ((uintptr_t)mr.end(),   HeapWordSize) == mr.end(),   "Unaligned end"  );
    1.18    for (int i = 0; i < _cur_covered_regions; i++) {
    1.19      MemRegion mri = mr.intersection(_covered[i]);
    1.20      if (!mri.is_empty()) dirty_MemRegion(mri);

mercurial