src/share/vm/gc_interface/collectedHeap.hpp
Print this page
rev 3216 : 7103665: HeapWord*ParallelScavengeHeap::failed_mem_allocate(unsigned long,bool)+0x97
Summary: Make sure that MutableNUMASpace::ensure_parsability() only calls CollectedHeap::fill_with_object() with valid sizes and make sure CollectedHeap::filler_array_max_size() returns a value that can be converted to an int without overflow
Reviewed-by: duke
@@ -126,11 +126,10 @@
virtual void accumulate_statistics_all_tlabs();
// Reinitialize tlabs before resuming mutators.
virtual void resize_all_tlabs();
- protected:
// Allocate from the current thread's TLAB, with broken-out slow path.
inline static HeapWord* allocate_from_tlab(Thread* thread, size_t size);
static HeapWord* allocate_from_tlab_slow(Thread* thread, size_t size);
// Allocate an uninitialized block of the given size, or returns NULL if
@@ -167,11 +166,10 @@
inline static void init_obj(HeapWord* obj, size_t size);
// Filler object utilities.
static inline size_t filler_array_hdr_size();
static inline size_t filler_array_min_size();
- static inline size_t filler_array_max_size();
DEBUG_ONLY(static void fill_args_check(HeapWord* start, size_t words);)
DEBUG_ONLY(static void zap_filler_array(HeapWord* start, size_t words, bool zap = true);)
// Fill with a single array; caller must ensure filler_array_min_size() <=
@@ -195,10 +193,14 @@
GenCollectedHeap,
ParallelScavengeHeap,
G1CollectedHeap
};
+ static inline size_t filler_array_max_size() {
+ return _filler_array_max_size;
+ }
+
virtual CollectedHeap::Name kind() const { return CollectedHeap::Abstract; }
/**
* Returns JNI error code JNI_ENOMEM if memory could not be allocated,
* and JNI_OK on success.