8311249: Remove unused MemAllocator::obj_memory_range

Reviewed-by: tschatzl
This commit is contained in:
Aleksey Shipilev 2023-07-04 09:01:47 +00:00
parent 514816ed7d
commit 711cddd899
2 changed files with 0 additions and 15 deletions

View File

@ -400,15 +400,6 @@ oop ObjAllocator::initialize(HeapWord* mem) const {
return finish(mem);
}
MemRegion ObjArrayAllocator::obj_memory_range(oop obj) const {
if (_do_zero) {
return MemAllocator::obj_memory_range(obj);
}
ArrayKlass* array_klass = ArrayKlass::cast(_klass);
const size_t hs = arrayOopDesc::header_size(array_klass->element_type());
return MemRegion(cast_from_oop<HeapWord*>(obj) + hs, _word_size - hs);
}
oop ObjArrayAllocator::initialize(HeapWord* mem) const {
// Set array length before setting the _klass field because a
// non-null klass field indicates that the object is parsable by

View File

@ -78,10 +78,6 @@ protected:
// back to calling CollectedHeap::mem_allocate().
HeapWord* mem_allocate(Allocation& allocation) const;
virtual MemRegion obj_memory_range(oop obj) const {
return MemRegion(cast_from_oop<HeapWord*>(obj), _word_size);
}
public:
// Allocate and fully construct the object, and perform various instrumentation. Could safepoint.
oop allocate() const;
@ -100,8 +96,6 @@ protected:
const int _length;
const bool _do_zero;
virtual MemRegion obj_memory_range(oop obj) const;
public:
ObjArrayAllocator(Klass* klass, size_t word_size, int length, bool do_zero,
Thread* thread = Thread::current())