SUGGESTED FIX
// The guard page is always committed and should not be committed over.
! // "guarded" is used for assertion checking below and recalls the fact
! // that the would-be end of the new committed region would have
! // penetrated the guard page.
! HeapWord* new_end_for_commit = new_end_aligned;
!
! debug_only(bool guarded = false;)
! if (new_end_for_commit > _guard_region.start()) {
! new_end_for_commit = _guard_region.start();
! debug_only(guarded = true;)
! }
assert(index_for(new_region.last()) < (int) _guard_index,
"The guard card will be overwritten");
! // This line commented out cleans the newly expanded region and
! // not the aligned up expanded region.
! // jbyte* const end = byte_after(new_region.last());
! jbyte* const end = (jbyte*) new_end_for_commit;
! assert((end >= byte_after(new_region.last())) || collided || guarded,
! "Expect to be beyond new region unless impacting another region");
|