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

@ -606,11 +606,21 @@ class CardGeneration: public Generation {
public:
// Attempt to expand the generation by "bytes". Expand by at a
// minimum "expand_bytes". Return true if some amount (not
// necessarily the full "bytes") was done.
virtual bool expand(size_t bytes, size_t expand_bytes);
virtual void clear_remembered_set();
virtual void invalidate_remembered_set();
virtual void prepare_for_verify();
// Grow generation with specified size (returns false if unable to grow)
virtual bool grow_by(size_t bytes) = 0;
// Grow generation to reserved size.
virtual bool grow_to_reserved() = 0;
};
// OneContigSpaceCardGeneration models a heap of old objects contained in a single
@ -631,14 +641,14 @@ class OneContigSpaceCardGeneration: public CardGeneration {
// and after last GC.
// Grow generation with specified size (returns false if unable to grow)
bool grow_by(size_t bytes);
virtual bool grow_by(size_t bytes);
// Grow generation to reserved size.
bool grow_to_reserved();
virtual bool grow_to_reserved();
// Shrink generation with specified size (returns false if unable to shrink)
void shrink_by(size_t bytes);
// Allocation failure
void expand(size_t bytes, size_t expand_bytes);
virtual bool expand(size_t bytes, size_t expand_bytes);
void shrink(size_t bytes);
// Accessing spaces