Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8248227: Shenandoah: Refactor Shenandoah::heap() to match other GCs
Reviewed-by: shade
  • Loading branch information
zhengyu123 committed Jun 29, 2020
1 parent c07ce7e commit fe145646e7200d4679791609046a7da07b5cf76f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
@@ -83,8 +83,6 @@
#include "services/mallocTracker.hpp"
#include "utilities/powerOfTwo.hpp"

ShenandoahHeap* ShenandoahHeap::_heap = NULL;

#ifdef ASSERT
template <class T>
void ShenandoahAssertToSpaceClosure::do_oop_work(T* p) {
@@ -497,8 +495,6 @@ ShenandoahHeap::ShenandoahHeap(ShenandoahCollectorPolicy* policy) :
_liveness_cache(NULL),
_collection_set(NULL)
{
_heap = this;

BarrierSet::set_barrier_set(new ShenandoahBarrierSet(this));

_max_workers = MAX2(_max_workers, 1U);
@@ -141,9 +141,6 @@ class ShenandoahHeap : public CollectedHeap {

// ---------- Initialization, termination, identification, printing routines
//
private:
static ShenandoahHeap* _heap;

public:
static ShenandoahHeap* heap();

@@ -49,8 +49,7 @@
#include "utilities/globalDefinitions.hpp"

inline ShenandoahHeap* ShenandoahHeap::heap() {
assert(_heap != NULL, "Heap is not initialized yet");
return _heap;
return named_heap<ShenandoahHeap>(CollectedHeap::Shenandoah);
}

inline ShenandoahHeapRegion* ShenandoahRegionIterator::next() {

0 comments on commit fe14564

Please sign in to comment.