hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp
changeset 1384 163a4d4fa951
parent 1374 4c24294029a9
child 1623 a0dd9009e992
equal deleted inserted replaced
1383:3a216aa862b7 1384:163a4d4fa951
   410   // We're not in the normal case.  We need to handle an important subcase
   410   // We're not in the normal case.  We need to handle an important subcase
   411   // here: LAB allocation.  An allocation previously recorded in the
   411   // here: LAB allocation.  An allocation previously recorded in the
   412   // offset table was actually a lab allocation, and was divided into
   412   // offset table was actually a lab allocation, and was divided into
   413   // several objects subsequently.  Fix this situation as we answer the
   413   // several objects subsequently.  Fix this situation as we answer the
   414   // query, by updating entries as we cross them.
   414   // query, by updating entries as we cross them.
   415   size_t next_index = _array->index_for(n) + 1;
   415 
       
   416   // If the fist object's end q is at the card boundary. Start refining
       
   417   // with the corresponding card (the value of the entry will be basically
       
   418   // set to 0). If the object crosses the boundary -- start from the next card.
       
   419   size_t next_index = _array->index_for(n) + !_array->is_card_boundary(n);
   416   HeapWord* next_boundary = _array->address_for_index(next_index);
   420   HeapWord* next_boundary = _array->address_for_index(next_index);
   417   if (csp() != NULL) {
   421   if (csp() != NULL) {
   418     if (addr >= csp()->top()) return csp()->top();
   422     if (addr >= csp()->top()) return csp()->top();
   419     while (next_boundary < addr) {
   423     while (next_boundary < addr) {
   420       while (n <= next_boundary) {
   424       while (n <= next_boundary) {