--- old/src/share/vm/gc/shared/cardTableRS.cpp 2015-06-02 19:45:18.000000000 +0200 +++ new/src/share/vm/gc/shared/cardTableRS.cpp 2015-06-02 19:45:18.000000000 +0200 @@ -302,7 +302,7 @@ } void CardTableRS::clear_into_younger(Generation* old_gen) { - assert(old_gen == GenCollectedHeap::heap()->old_gen(), + assert(GenCollectedHeap::heap()->is_old_gen(old_gen), "Should only be called for the old generation"); // The card tables for the youngest gen need never be cleared. // There's a bit of subtlety in the clear() and invalidate() @@ -314,7 +314,7 @@ } void CardTableRS::invalidate_or_clear(Generation* old_gen) { - assert(old_gen == GenCollectedHeap::heap()->old_gen(), + assert(GenCollectedHeap::heap()->is_old_gen(old_gen), "Should only be called for the old generation"); // Invalidate the cards for the currently occupied part of // the old generation and clear the cards for the @@ -381,7 +381,7 @@ VerifyCTGenClosure(CardTableRS* ct) : _ct(ct) {} void do_generation(Generation* gen) { // Skip the youngest generation. - if (gen == GenCollectedHeap::heap()->young_gen()) { + if (GenCollectedHeap::heap()->is_young_gen(gen)) { return; } // Normally, we're interested in pointers to younger generations.