Mercurial > hg > graal-compiler
comparison src/share/vm/gc_interface/collectedHeap.hpp @ 5965:cc74fa5a91a9
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: azeemj, jmasa, iveresov
author | brutisso |
---|---|
date | Fri, 23 Mar 2012 15:28:24 +0100 |
parents | aa3d708d67c4 |
children | 9a9bb0010c91 |
comparison
equal
deleted
inserted
replaced
5964:21595f05bc93 | 5965:cc74fa5a91a9 |
---|---|
126 virtual void accumulate_statistics_all_tlabs(); | 126 virtual void accumulate_statistics_all_tlabs(); |
127 | 127 |
128 // Reinitialize tlabs before resuming mutators. | 128 // Reinitialize tlabs before resuming mutators. |
129 virtual void resize_all_tlabs(); | 129 virtual void resize_all_tlabs(); |
130 | 130 |
131 protected: | |
132 // Allocate from the current thread's TLAB, with broken-out slow path. | 131 // Allocate from the current thread's TLAB, with broken-out slow path. |
133 inline static HeapWord* allocate_from_tlab(Thread* thread, size_t size); | 132 inline static HeapWord* allocate_from_tlab(Thread* thread, size_t size); |
134 static HeapWord* allocate_from_tlab_slow(Thread* thread, size_t size); | 133 static HeapWord* allocate_from_tlab_slow(Thread* thread, size_t size); |
135 | 134 |
136 // Allocate an uninitialized block of the given size, or returns NULL if | 135 // Allocate an uninitialized block of the given size, or returns NULL if |
167 inline static void init_obj(HeapWord* obj, size_t size); | 166 inline static void init_obj(HeapWord* obj, size_t size); |
168 | 167 |
169 // Filler object utilities. | 168 // Filler object utilities. |
170 static inline size_t filler_array_hdr_size(); | 169 static inline size_t filler_array_hdr_size(); |
171 static inline size_t filler_array_min_size(); | 170 static inline size_t filler_array_min_size(); |
172 static inline size_t filler_array_max_size(); | |
173 | 171 |
174 DEBUG_ONLY(static void fill_args_check(HeapWord* start, size_t words);) | 172 DEBUG_ONLY(static void fill_args_check(HeapWord* start, size_t words);) |
175 DEBUG_ONLY(static void zap_filler_array(HeapWord* start, size_t words, bool zap = true);) | 173 DEBUG_ONLY(static void zap_filler_array(HeapWord* start, size_t words, bool zap = true);) |
176 | 174 |
177 // Fill with a single array; caller must ensure filler_array_min_size() <= | 175 // Fill with a single array; caller must ensure filler_array_min_size() <= |
194 SharedHeap, | 192 SharedHeap, |
195 GenCollectedHeap, | 193 GenCollectedHeap, |
196 ParallelScavengeHeap, | 194 ParallelScavengeHeap, |
197 G1CollectedHeap | 195 G1CollectedHeap |
198 }; | 196 }; |
197 | |
198 static inline size_t filler_array_max_size() { | |
199 return _filler_array_max_size; | |
200 } | |
199 | 201 |
200 virtual CollectedHeap::Name kind() const { return CollectedHeap::Abstract; } | 202 virtual CollectedHeap::Name kind() const { return CollectedHeap::Abstract; } |
201 | 203 |
202 /** | 204 /** |
203 * Returns JNI error code JNI_ENOMEM if memory could not be allocated, | 205 * Returns JNI error code JNI_ENOMEM if memory could not be allocated, |