mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8209126: ZGC: ZMarkStackAllocator::is_initialized() never called
Reviewed-by: eosterlund, tschatzl
This commit is contained in:
parent
6c7f0f0218
commit
abb1e458eb
3 changed files with 8 additions and 2 deletions
|
@ -96,7 +96,7 @@ size_t ZHeap::heap_max_reserve_size() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ZHeap::is_initialized() const {
|
bool ZHeap::is_initialized() const {
|
||||||
return _page_allocator.is_initialized();
|
return _page_allocator.is_initialized() && _mark.is_initialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ZHeap::min_capacity() const {
|
size_t ZHeap::min_capacity() const {
|
||||||
|
|
|
@ -70,6 +70,10 @@ ZMark::ZMark(ZWorkers* workers, ZPageTable* pagetable) :
|
||||||
_ncontinue(0),
|
_ncontinue(0),
|
||||||
_nworkers(0) {}
|
_nworkers(0) {}
|
||||||
|
|
||||||
|
bool ZMark::is_initialized() const {
|
||||||
|
return _allocator.is_initialized();
|
||||||
|
}
|
||||||
|
|
||||||
size_t ZMark::calculate_nstripes(uint nworkers) const {
|
size_t ZMark::calculate_nstripes(uint nworkers) const {
|
||||||
// Calculate the number of stripes from the number of workers we use,
|
// Calculate the number of stripes from the number of workers we use,
|
||||||
// where the number of stripes must be a power of two and we want to
|
// where the number of stripes must be a power of two and we want to
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -102,6 +102,8 @@ private:
|
||||||
public:
|
public:
|
||||||
ZMark(ZWorkers* workers, ZPageTable* pagetable);
|
ZMark(ZWorkers* workers, ZPageTable* pagetable);
|
||||||
|
|
||||||
|
bool is_initialized() const;
|
||||||
|
|
||||||
template <bool finalizable, bool publish> void mark_object(uintptr_t addr);
|
template <bool finalizable, bool publish> void mark_object(uintptr_t addr);
|
||||||
|
|
||||||
void start();
|
void start();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue