Skip to content

Commit

Permalink
8331715: Remove virtual specifiers in ContiguousSpace
Browse files Browse the repository at this point in the history
Reviewed-by: gli, tschatzl
  • Loading branch information
albertnetymk committed May 8, 2024
1 parent 7f29904 commit 0e1dca7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/hotspot/share/gc/shared/space.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ class ContiguousSpace: public CHeapObj<mtGC> {
// Accessors
HeapWord* bottom() const { return _bottom; }
HeapWord* end() const { return _end; }
HeapWord* top() const { return _top; }

void set_bottom(HeapWord* value) { _bottom = value; }
void set_end(HeapWord* value) { _end = value; }
void set_top(HeapWord* value) { _top = value; }

// Testers
bool is_empty() const { return used() == 0; }
Expand Down Expand Up @@ -112,10 +115,6 @@ class ContiguousSpace: public CHeapObj<mtGC> {
// had allocation performed in it, but is now to be considered empty.
void clear(bool mangle_space);

// Accessors
HeapWord* top() const { return _top; }
void set_top(HeapWord* value) { _top = value; }

// Used to save the space's current top for later use during mangling.
void set_top_for_allocations() PRODUCT_RETURN;

Expand All @@ -139,9 +138,9 @@ class ContiguousSpace: public CHeapObj<mtGC> {

// Allocation (return null if full). Assumes the caller has established
// mutually exclusive access to the space.
virtual HeapWord* allocate(size_t word_size);
HeapWord* allocate(size_t word_size);
// Allocation (return null if full). Enforces mutual exclusion internally.
virtual HeapWord* par_allocate(size_t word_size);
HeapWord* par_allocate(size_t word_size);

// Iteration
void object_iterate(ObjectClosure* blk);
Expand Down

1 comment on commit 0e1dca7

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.