mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8202776: Modularize GC allocations in runtime
Reviewed-by: eosterlund, shade
This commit is contained in:
parent
fcfd1c85dd
commit
26b8ea76f5
3 changed files with 43 additions and 30 deletions
|
@ -141,8 +141,15 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
|||
virtual void resize_all_tlabs();
|
||||
|
||||
// Allocate from the current thread's TLAB, with broken-out slow path.
|
||||
inline static HeapWord* allocate_from_tlab(Klass* klass, Thread* thread, size_t size);
|
||||
static HeapWord* allocate_from_tlab_slow(Klass* klass, Thread* thread, size_t size);
|
||||
inline static HeapWord* allocate_from_tlab(Klass* klass, size_t size, TRAPS);
|
||||
static HeapWord* allocate_from_tlab_slow(Klass* klass, size_t size, TRAPS);
|
||||
|
||||
// Raw memory allocation facilities
|
||||
// The obj and array allocate methods are covers for these methods.
|
||||
// mem_allocate() should never be
|
||||
// called to allocate TLABs, only individual objects.
|
||||
virtual HeapWord* mem_allocate(size_t size,
|
||||
bool* gc_overhead_limit_was_exceeded) = 0;
|
||||
|
||||
// Allocate an uninitialized block of the given size, or returns NULL if
|
||||
// this is impossible.
|
||||
|
@ -309,12 +316,12 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
|||
inline static oop array_allocate_nozero(Klass* klass, int size, int length, TRAPS);
|
||||
inline static oop class_allocate(Klass* klass, int size, TRAPS);
|
||||
|
||||
// Raw memory allocation facilities
|
||||
// The obj and array allocate methods are covers for these methods.
|
||||
// mem_allocate() should never be
|
||||
// called to allocate TLABs, only individual objects.
|
||||
virtual HeapWord* mem_allocate(size_t size,
|
||||
bool* gc_overhead_limit_was_exceeded) = 0;
|
||||
// Raw memory allocation. This may or may not use TLAB allocations to satisfy the
|
||||
// allocation. A GC implementation may override this function to satisfy the allocation
|
||||
// in any way. But the default is to try a TLAB allocation, and otherwise perform
|
||||
// mem_allocate.
|
||||
virtual HeapWord* obj_allocate_raw(Klass* klass, size_t size,
|
||||
bool* gc_overhead_limit_was_exceeded, TRAPS);
|
||||
|
||||
// Utilities for turning raw memory into filler objects.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue