296 // Heap_lock. The getter, setter and predicate require the caller
297 // owns the lock. Swap is used by parallel non-concurrent reference
298 // processing threads, where some higher level controller owns
299 // Heap_lock, so requires the lock is locked, but not necessarily by
300 // the current thread.
301 static oop reference_pending_list();
302 static void clear_reference_pending_list();
303 static bool has_reference_pending_list();
304 static oop swap_reference_pending_list(oop list);
305
306 static Array<int>* the_empty_int_array() { return _the_empty_int_array; }
307 static Array<u2>* the_empty_short_array() { return _the_empty_short_array; }
308 static Array<Method*>* the_empty_method_array() { return _the_empty_method_array; }
309 static Array<Klass*>* the_empty_klass_array() { return _the_empty_klass_array; }
310 static Array<InstanceKlass*>* the_empty_instance_klass_array() { return _the_empty_instance_klass_array; }
311
312 // OutOfMemoryError support. Returns an error with the required message. The returned error
313 // may or may not have a backtrace. If error has a backtrace then the stack trace is already
314 // filled in.
315 static oop out_of_memory_error_java_heap();
316 static oop out_of_memory_error_metaspace();
317 static oop out_of_memory_error_class_metaspace();
318 static oop out_of_memory_error_array_size();
319 static oop out_of_memory_error_gc_overhead_limit();
320 static oop out_of_memory_error_realloc_objects();
321
322 // Throw default _out_of_memory_error_retry object as it will never propagate out of the VM
323 static oop out_of_memory_error_retry();
324 static oop delayed_stack_overflow_error_message();
325
326 // The particular choice of collected heap.
327 static CollectedHeap* heap() { return _collectedHeap; }
328
329 // Reserve Java heap and determine CompressedOops mode
330 static ReservedHeapSpace reserve_heap(size_t heap_size, size_t alignment);
331
332 // Historic gc information
333 static size_t get_heap_free_at_last_gc() { return _heap_capacity_at_last_gc - _heap_used_at_last_gc; }
334 static size_t get_heap_used_at_last_gc() { return _heap_used_at_last_gc; }
335 static void update_heap_info_at_gc();
|
296 // Heap_lock. The getter, setter and predicate require the caller
297 // owns the lock. Swap is used by parallel non-concurrent reference
298 // processing threads, where some higher level controller owns
299 // Heap_lock, so requires the lock is locked, but not necessarily by
300 // the current thread.
301 static oop reference_pending_list();
302 static void clear_reference_pending_list();
303 static bool has_reference_pending_list();
304 static oop swap_reference_pending_list(oop list);
305
306 static Array<int>* the_empty_int_array() { return _the_empty_int_array; }
307 static Array<u2>* the_empty_short_array() { return _the_empty_short_array; }
308 static Array<Method*>* the_empty_method_array() { return _the_empty_method_array; }
309 static Array<Klass*>* the_empty_klass_array() { return _the_empty_klass_array; }
310 static Array<InstanceKlass*>* the_empty_instance_klass_array() { return _the_empty_instance_klass_array; }
311
312 // OutOfMemoryError support. Returns an error with the required message. The returned error
313 // may or may not have a backtrace. If error has a backtrace then the stack trace is already
314 // filled in.
315 static oop out_of_memory_error_java_heap();
316 static oop out_of_memory_error_c_heap();
317 static oop out_of_memory_error_metaspace();
318 static oop out_of_memory_error_class_metaspace();
319 static oop out_of_memory_error_array_size();
320 static oop out_of_memory_error_gc_overhead_limit();
321 static oop out_of_memory_error_realloc_objects();
322
323 // Throw default _out_of_memory_error_retry object as it will never propagate out of the VM
324 static oop out_of_memory_error_retry();
325 static oop delayed_stack_overflow_error_message();
326
327 // The particular choice of collected heap.
328 static CollectedHeap* heap() { return _collectedHeap; }
329
330 // Reserve Java heap and determine CompressedOops mode
331 static ReservedHeapSpace reserve_heap(size_t heap_size, size_t alignment);
332
333 // Historic gc information
334 static size_t get_heap_free_at_last_gc() { return _heap_capacity_at_last_gc - _heap_used_at_last_gc; }
335 static size_t get_heap_used_at_last_gc() { return _heap_used_at_last_gc; }
336 static void update_heap_info_at_gc();
|