6730514: assertion failure in mangling code when expanding by 0 bytes

An expansion by 0 bytes was not anticipated when the assertion was composed.

Reviewed-by: jjh, jcoomes, apetrusenko
This commit is contained in:
Jon Masamitsu 2008-07-30 11:54:00 -07:00
parent b8633a3b01
commit 74b3de5c3b
9 changed files with 87 additions and 53 deletions

View file

@ -1048,10 +1048,6 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
double _initiating_occupancy;
protected:
// Grow generation by specified size (returns false if unable to grow)
bool grow_by(size_t bytes);
// Grow generation to reserved size.
bool grow_to_reserved();
// Shrink generation by specified size (returns false if unable to shrink)
virtual void shrink_by(size_t bytes);
@ -1103,6 +1099,11 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
// Override
virtual void ref_processor_init();
// Grow generation by specified size (returns false if unable to grow)
bool grow_by(size_t bytes);
// Grow generation to reserved size.
bool grow_to_reserved();
void clear_expansion_cause() { _expansion_cause = CMSExpansionCause::_no_expansion; }
// Space enquiries
@ -1193,6 +1194,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
// Allocation failure
void expand(size_t bytes, size_t expand_bytes,
CMSExpansionCause::Cause cause);
virtual bool expand(size_t bytes, size_t expand_bytes);
void shrink(size_t bytes);
HeapWord* expand_and_par_lab_allocate(CMSParGCThreadState* ps, size_t word_sz);
bool expand_and_ensure_spooling_space(PromotionInfo* promo);