Skip to content

Commit 2750569

Browse files
committed
8230096: ZGC: Remove unused ZObjectAllocator::_nworkers
Reviewed-by: stefank
1 parent 536122f commit 2750569

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/hotspot/share/gc/z/zHeap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ ZHeap* ZHeap::_heap = NULL;
6464

6565
ZHeap::ZHeap() :
6666
_workers(),
67-
_object_allocator(_workers.nworkers()),
67+
_object_allocator(),
6868
_page_allocator(heap_min_size(), heap_initial_size(), heap_max_size(), heap_max_reserve_size()),
6969
_page_table(),
7070
_forwarding_table(),

src/hotspot/share/gc/z/zObjectAllocator.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
static const ZStatCounter ZCounterUndoObjectAllocationSucceeded("Memory", "Undo Object Allocation Succeeded", ZStatUnitOpsPerSecond);
4242
static const ZStatCounter ZCounterUndoObjectAllocationFailed("Memory", "Undo Object Allocation Failed", ZStatUnitOpsPerSecond);
4343

44-
ZObjectAllocator::ZObjectAllocator(uint nworkers) :
45-
_nworkers(nworkers),
44+
ZObjectAllocator::ZObjectAllocator() :
4645
_used(0),
4746
_undone(0),
4847
_shared_medium_page(NULL),

src/hotspot/share/gc/z/zObjectAllocator.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
class ZObjectAllocator {
3333
private:
34-
const uint _nworkers;
3534
ZPerCPU<size_t> _used;
3635
ZPerCPU<size_t> _undone;
3736
ZContended<ZPage*> _shared_medium_page;
@@ -64,7 +63,7 @@ class ZObjectAllocator {
6463
bool undo_alloc_object(ZPage* page, uintptr_t addr, size_t size);
6564

6665
public:
67-
ZObjectAllocator(uint nworkers);
66+
ZObjectAllocator();
6867

6968
uintptr_t alloc_object(size_t size);
7069

0 commit comments

Comments
 (0)