@@ -286,7 +286,7 @@ class DirtyCardToOopClosure: public MemRegionClosureRO {
286286 NOT_PRODUCT (_last_explicit_min_done = NULL );
287287 }
288288
289- void do_MemRegion (MemRegion mr);
289+ void do_MemRegion (MemRegion mr) override ;
290290
291291 void set_min_done (HeapWord* min_done) {
292292 _min_done = min_done;
@@ -330,8 +330,8 @@ class CompactibleSpace: public Space {
330330 CompactibleSpace () :
331331 _compaction_top (NULL ), _next_compaction_space(NULL ) {}
332332
333- virtual void initialize (MemRegion mr, bool clear_space, bool mangle_space);
334- virtual void clear (bool mangle_space);
333+ void initialize (MemRegion mr, bool clear_space, bool mangle_space) override ;
334+ void clear (bool mangle_space) override ;
335335
336336 // Used temporarily during a compaction phase to hold the value
337337 // top should have when compaction is complete.
@@ -372,7 +372,7 @@ class CompactibleSpace: public Space {
372372 // indicates when the next such action should be taken.
373373 virtual void prepare_for_compaction (CompactPoint* cp) = 0;
374374 // MarkSweep support phase3
375- virtual void adjust_pointers ();
375+ void adjust_pointers () override ;
376376 // MarkSweep support phase4
377377 virtual void compact ();
378378#endif // INCLUDE_SERIALGC
@@ -438,8 +438,8 @@ class ContiguousSpace: public CompactibleSpace {
438438 ContiguousSpace ();
439439 ~ContiguousSpace ();
440440
441- virtual void initialize (MemRegion mr, bool clear_space, bool mangle_space);
442- virtual void clear (bool mangle_space);
441+ void initialize (MemRegion mr, bool clear_space, bool mangle_space) override ;
442+ void clear (bool mangle_space) override ;
443443
444444 // Accessors
445445 HeapWord* top () const { return _top; }
@@ -460,9 +460,9 @@ class ContiguousSpace: public CompactibleSpace {
460460
461461 // Mangle regions in the space from the current top up to the
462462 // previously mangled part of the space.
463- void mangle_unused_area () PRODUCT_RETURN;
463+ void mangle_unused_area () override PRODUCT_RETURN;
464464 // Mangle [top, end)
465- void mangle_unused_area_complete () PRODUCT_RETURN;
465+ void mangle_unused_area_complete () override PRODUCT_RETURN;
466466
467467 // Do some sparse checking on the area that should have been mangled.
468468 void check_mangled_unused_area (HeapWord* limit) PRODUCT_RETURN;
@@ -472,33 +472,33 @@ class ContiguousSpace: public CompactibleSpace {
472472
473473 // Size computations: sizes in bytes.
474474 size_t capacity () const { return byte_size (bottom (), end ()); }
475- size_t used () const { return byte_size (bottom (), top ()); }
476- size_t free () const { return byte_size (top (), end ()); }
475+ size_t used () const override { return byte_size (bottom (), top ()); }
476+ size_t free () const override { return byte_size (top (), end ()); }
477477
478- virtual bool is_free_block (const HeapWord* p) const ;
478+ bool is_free_block (const HeapWord* p) const override ;
479479
480480 // In a contiguous space we have a more obvious bound on what parts
481481 // contain objects.
482- MemRegion used_region () const { return MemRegion (bottom (), top ()); }
482+ MemRegion used_region () const override { return MemRegion (bottom (), top ()); }
483483
484484 // Allocation (return NULL if full)
485- virtual HeapWord* allocate (size_t word_size);
486- virtual HeapWord* par_allocate (size_t word_size);
485+ HeapWord* allocate (size_t word_size) override ;
486+ HeapWord* par_allocate (size_t word_size) override ;
487487
488488 // Iteration
489- void oop_iterate (OopIterateClosure* cl);
490- void object_iterate (ObjectClosure* blk);
489+ void oop_iterate (OopIterateClosure* cl) override ;
490+ void object_iterate (ObjectClosure* blk) override ;
491491
492492 // Compaction support
493- virtual void reset_after_compaction () {
493+ void reset_after_compaction () override {
494494 assert (compaction_top () >= bottom () && compaction_top () <= end (), " should point inside space" );
495495 set_top (compaction_top ());
496496 }
497497
498498 // Override.
499499 DirtyCardToOopClosure* new_dcto_cl (OopIterateClosure* cl,
500500 CardTable::PrecisionStyle precision,
501- HeapWord* boundary);
501+ HeapWord* boundary) override ;
502502
503503 // Apply "blk->do_oop" to the addresses of all reference fields in objects
504504 // starting with the _saved_mark_word, which was noted during a generation's
@@ -516,29 +516,29 @@ class ContiguousSpace: public CompactibleSpace {
516516 virtual void object_iterate_from (HeapWord* mark, ObjectClosure* blk);
517517
518518 // Very inefficient implementation.
519- virtual HeapWord* block_start_const (const void * p) const ;
520- size_t block_size (const HeapWord* p) const ;
519+ HeapWord* block_start_const (const void * p) const override ;
520+ size_t block_size (const HeapWord* p) const override ;
521521 // If a block is in the allocated area, it is an object.
522- bool block_is_obj (const HeapWord* p) const { return p < top (); }
522+ bool block_is_obj (const HeapWord* p) const override { return p < top (); }
523523
524524 // Addresses for inlined allocation
525525 HeapWord** top_addr () { return &_top; }
526526 HeapWord** end_addr () { return &_end; }
527527
528528#if INCLUDE_SERIALGC
529529 // Overrides for more efficient compaction support.
530- void prepare_for_compaction (CompactPoint* cp);
530+ void prepare_for_compaction (CompactPoint* cp) override ;
531531#endif
532532
533- virtual void print_on (outputStream* st) const ;
533+ void print_on (outputStream* st) const override ;
534534
535535 // Checked dynamic downcasts.
536- virtual ContiguousSpace* toContiguousSpace () {
536+ ContiguousSpace* toContiguousSpace () override {
537537 return this ;
538538 }
539539
540540 // Debugging
541- virtual void verify () const ;
541+ void verify () const override ;
542542};
543543
544544// A dirty card to oop closure for contiguous spaces (ContiguousSpace and
@@ -554,9 +554,9 @@ class ContiguousSpace: public CompactibleSpace {
554554class ContiguousSpaceDCTOC : public DirtyCardToOopClosure {
555555 // Overrides.
556556 void walk_mem_region (MemRegion mr,
557- HeapWord* bottom, HeapWord* top);
557+ HeapWord* bottom, HeapWord* top) override ;
558558
559- HeapWord* get_actual_top (HeapWord* top, HeapWord* top_obj);
559+ HeapWord* get_actual_top (HeapWord* top, HeapWord* top_obj) override ;
560560
561561 // Walk the given memory region, from bottom to top, applying
562562 // the given oop closure to (possibly) all objects found. The
@@ -597,25 +597,25 @@ class OffsetTableContigSpace: public ContiguousSpace {
597597 OffsetTableContigSpace (BlockOffsetSharedArray* sharedOffsetArray,
598598 MemRegion mr);
599599
600- void set_bottom (HeapWord* value);
601- void set_end (HeapWord* value);
600+ void set_bottom (HeapWord* value) override ;
601+ void set_end (HeapWord* value) override ;
602602
603- void clear (bool mangle_space);
603+ void clear (bool mangle_space) override ;
604604
605- inline HeapWord* block_start_const (const void * p) const ;
605+ inline HeapWord* block_start_const (const void * p) const override ;
606606
607607 // Add offset table update.
608- virtual inline HeapWord* allocate (size_t word_size);
609- inline HeapWord* par_allocate (size_t word_size);
608+ inline HeapWord* allocate (size_t word_size) override ;
609+ inline HeapWord* par_allocate (size_t word_size) override ;
610610
611611 // MarkSweep support phase3
612- virtual void initialize_threshold ();
613- virtual void alloc_block (HeapWord* start, HeapWord* end);
612+ void initialize_threshold () override ;
613+ void alloc_block (HeapWord* start, HeapWord* end) override ;
614614
615- virtual void print_on (outputStream* st) const ;
615+ void print_on (outputStream* st) const override ;
616616
617617 // Debugging
618- void verify () const ;
618+ void verify () const override ;
619619};
620620
621621
@@ -625,7 +625,7 @@ class TenuredSpace: public OffsetTableContigSpace {
625625 friend class VMStructs ;
626626 protected:
627627 // Mark sweep support
628- size_t allowed_dead_ratio () const ;
628+ size_t allowed_dead_ratio () const override ;
629629 public:
630630 // Constructor
631631 TenuredSpace (BlockOffsetSharedArray* sharedOffsetArray,
0 commit comments