< prev index next >

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

Print this page

        

*** 26,35 **** --- 26,36 ---- #include "gc/shared/suspendibleThreadSet.hpp" #include "gc/z/zCollectedHeap.hpp" #include "gc/z/zGlobals.hpp" #include "gc/z/zHeap.inline.hpp" #include "gc/z/zNMethod.hpp" + #include "gc/z/zObjArrayAllocator.hpp" #include "gc/z/zServiceability.hpp" #include "gc/z/zStat.hpp" #include "gc/z/zUtils.inline.hpp" #include "memory/universe.hpp" #include "runtime/mutexLocker.hpp"
*** 125,134 **** --- 126,144 ---- } return (HeapWord*)addr; } + oop ZCollectedHeap::array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS) { + if (!do_zero) { + return CollectedHeap::array_allocate(klass, size, length, false /* do_zero */, THREAD); + } + + ZObjArrayAllocator allocator(klass, size, length, THREAD); + return allocator.allocate(); + } + HeapWord* ZCollectedHeap::mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded) { const size_t size_in_bytes = ZUtils::words_to_bytes(align_object_size(size)); return (HeapWord*)_heap.alloc_object(size_in_bytes); }
< prev index next >