comparison src/share/vm/memory/space.hpp @ 347:60fb9c4db4e6

6718086: CMS assert: _concurrent_iteration_safe_limit update missed Summary: Initialize the field correctly in ContiguousSpace's constructor and initialize() methods, using the latter for the survivor spaces upon initial construction or a subsequent resizing of the young generation. Add some missing Space sub-class constructors. Reviewed-by: apetrusenko
author ysr
date Mon, 23 Jun 2008 16:49:37 -0700
parents 37f87013dfd8
children 1ee8caae33af
comparison
equal deleted inserted replaced
346:bb254e57d2f4 347:60fb9c4db4e6
371 private: 371 private:
372 HeapWord* _compaction_top; 372 HeapWord* _compaction_top;
373 CompactibleSpace* _next_compaction_space; 373 CompactibleSpace* _next_compaction_space;
374 374
375 public: 375 public:
376 CompactibleSpace() :
377 _compaction_top(NULL), _next_compaction_space(NULL) {}
378
376 virtual void initialize(MemRegion mr, bool clear_space); 379 virtual void initialize(MemRegion mr, bool clear_space);
377 virtual void clear(); 380 virtual void clear();
378 381
379 // Used temporarily during a compaction phase to hold the value 382 // Used temporarily during a compaction phase to hold the value
380 // top should have when compaction is complete. 383 // top should have when compaction is complete.
764 // Allocation helpers (return NULL if full). 767 // Allocation helpers (return NULL if full).
765 inline HeapWord* allocate_impl(size_t word_size, HeapWord* end_value); 768 inline HeapWord* allocate_impl(size_t word_size, HeapWord* end_value);
766 inline HeapWord* par_allocate_impl(size_t word_size, HeapWord* end_value); 769 inline HeapWord* par_allocate_impl(size_t word_size, HeapWord* end_value);
767 770
768 public: 771 public:
772 ContiguousSpace() :
773 _top(NULL),
774 _concurrent_iteration_safe_limit(NULL) {}
775
769 virtual void initialize(MemRegion mr, bool clear_space); 776 virtual void initialize(MemRegion mr, bool clear_space);
770 777
771 // Accessors 778 // Accessors
772 HeapWord* top() const { return _top; } 779 HeapWord* top() const { return _top; }
773 void set_top(HeapWord* value) { _top = value; } 780 void set_top(HeapWord* value) { _top = value; }
968 // reached, the slow-path allocation code can invoke other actions and then 975 // reached, the slow-path allocation code can invoke other actions and then
969 // adjust _soft_end up to a new soft limit or to end(). 976 // adjust _soft_end up to a new soft limit or to end().
970 HeapWord* _soft_end; 977 HeapWord* _soft_end;
971 978
972 public: 979 public:
973 EdenSpace(DefNewGeneration* gen) : _gen(gen) { _soft_end = NULL; } 980 EdenSpace(DefNewGeneration* gen) :
981 _gen(gen), _soft_end(NULL) {}
974 982
975 // Get/set just the 'soft' limit. 983 // Get/set just the 'soft' limit.
976 HeapWord* soft_end() { return _soft_end; } 984 HeapWord* soft_end() { return _soft_end; }
977 HeapWord** soft_end_addr() { return &_soft_end; } 985 HeapWord** soft_end_addr() { return &_soft_end; }
978 void set_soft_end(HeapWord* value) { _soft_end = value; } 986 void set_soft_end(HeapWord* value) { _soft_end = value; }