comparison src/share/vm/gc_implementation/g1/sparsePRT.cpp @ 617:0db4adb6e914

6810698: G1: two small bugs in the sparse remembered sets Summary: The _expanded flag of the sparse RSets is not reset and this can leave a RSet in an inconsistent state if it is expanded more than once. Also, we should be iterating over the _cur, instead of the _next, sparse table Reviewed-by: apetrusenko, iveresov
author tonyp
date Sat, 07 Mar 2009 11:07:36 -0500
parents 37f87013dfd8
children d44bdab1c03d
comparison
equal deleted inserted replaced
616:4f360ec815ba 617:0db4adb6e914
502 502
503 void SparsePRT::cleanup() { 503 void SparsePRT::cleanup() {
504 // Make sure that the current and next tables agree. (Another mechanism 504 // Make sure that the current and next tables agree. (Another mechanism
505 // takes care of deleting now-unused tables.) 505 // takes care of deleting now-unused tables.)
506 _cur = _next; 506 _cur = _next;
507 set_expanded(false);
507 } 508 }
508 509
509 void SparsePRT::expand() { 510 void SparsePRT::expand() {
510 RSHashTable* last = _next; 511 RSHashTable* last = _next;
511 _next = new RSHashTable(last->capacity() * 2); 512 _next = new RSHashTable(last->capacity() * 2);